include
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
int t;
cin>>t;
int b[t],i,n,a[t][201],endp[t],u=0;
for(i=0;i<t;i++)
{ cin>>b[i];}
for(i=0;i<t;i++)
{ a[i][0]=1;}
int temp=0,x=0,k,j=0;
for(i=0;i<t;i++)
{
n=b[i];
for(;n>1;n--)
{
for(k=0;k<=j;k++)
{
x=(a[i][k]*n)+temp;
a[i][k]=x%10;
temp=x/10;
}
while(temp>0)
{
a[i][++j]=temp;
temp=temp/10;
}
}
endp[u]=j;
u++;
j=0;
}
cout<<"\n";
for(i=0;i<t;i++)
{
j=endp[i];
while(j>=0)
{ cout<<a[i][j];j--;}
cout<<"\n";
}
return 0;
}
indent preformatted text by 4 spaces