```cpp
#include<bits/stdc++.h>
using namespace std;
int fact(int x)
{
if(x==1)
{
return 1;
}
if(x==2)
{
return 2;
}
else
{
return fact(x-2)+fact(x-1);
}
}
int main(void)
{
int n,m;
scanf("%d",&n);
while(n--)
{
scanf("%d",&m);
printf("%d\n",fact(m-1));
}
return 0;
}