#include
using namespace std;
long long fact(int n)
{
if(n==0)
{
return 1;
}
else
{
return n*fact(n-1);
}
}
int main() {
// your code goes
int t;
cin>>t;
while(t–)
{
int n;
long long z;
cin>>n;
z=fact(n);
cout<<z<<endl;
}
return 0;
}