#include <iostream>
using namespace std;
long long Fib(int i){
long a = 0,b = 1,c;
if(i == 0) c = a;
if(i == 1) c = b;
if(i > 1){
for(int j = 2 ; j <= i ; j++){
c = a + b;
a = b;
b = c;
}
}
return c;
}
int main(){
int m,n;
cin>>n;
for(int i = 0 ; i < n ; i++){
cin>>m;
cout<<"Fib("<<m<<") = "<<Fib(m)<<endl;
}
return 0;
}