#include using namespace std; #include using namespace atcoder; #define rep(i,N) for(int i=0;i vch[40]; int sol(ll N){ vector cnt(12,0); rep(i,12)while(N%ch[i]==0){ N/=ch[i]; cnt[i]++; } ll now=1; for(auto x:cnt)now*=x+1; rep(ans,40){ auto& t=vch[ans]; ll ret=now; rep(i,12){ if(t[i]){ ret/=cnt[i]+1; ret*=cnt[i]+t[i]+1; } } if(ret==now*2)return ans+1; } assert(false); } int main(){ rep(j,40){ vector v(12,0); auto N=j+1; rep(i,12)while(N%ch[i]==0){ N/=ch[i]; v[i]++; } vch[j]=v; } cin.tie(0); ios::sync_with_stdio(0); int T; cin>>T; while(T--){ ll N; cin>>N; cout<