https://cdn.luogu.com.cn/upload/image_hosting/vlpqs50u.png
#include<bits/stdc++.h>
using namespace std;
typedef __int128 intpro;
int in()
{
int k=0,f=1;
char c=getchar();
while(c<'0'||c>'9')
{
if(c=='-')f=-1;
c=getchar();
}
while(c>='0'&&c<='9')k=k*10+c-'0',c=getchar();
return k*f;
}
void out(intpro x)
{
if(x<0) putchar('-'),x=-x;
if(x<10) putchar(x+'0');
else out(x/10),putchar(x%10+'0');
}
intpro fun(int n)
{
intpro mx=0;
for(intpro i=1;i<n-1;i++)
{
for(intpro j=1;j<n-i;j++)
{
int h=n-i-j;
if(h>0)
{
intpro tot=i*j*h;
if(tot>mx) mx=tot;
}
}
}
return mx;
}
signed main()
{
int t=in();
while(t--)
{
int n=in();
intpro x=fun(n);
out(fun(x));
cout<<"\n";
}
}