#include using namespace std; using Int = long long; const char newl = '\n'; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a void drop(const T &x){cout< vector read(size_t n){ vector ts(n); for(size_t i=0;i>ts[i]; return ts; } vector identity(Int n){ vector ord(n); iota(ord.begin(),ord.end(),0); return ord; } template T mod_pow(T a,long long n,T mod){ using ll = long long; T res(1); while(n){ if(n&1) res=(ll)res*a%mod; a=(ll)a*a%mod; n>>=1; } return res; } template T order(T x,T MOD){ T res=MOD-1; vector cand; for(T i=1;i*i<=res;i++){ if(res%i) continue; cand.emplace_back(i); cand.emplace_back(res/i); } sort(cand.begin(),cand.end()); for(T c:cand) if(mod_pow(x,c,MOD)==1) return c; return res; } //INSERT ABOVE HERE signed main(){ cin.tie(0); ios::sync_with_stdio(0); auto solve=[](Int n){ return order(2,2*n-1); /* Int res=0,tmp=1; do{ tmp+=2*n-1; while(tmp%2==0) tmp/=2,res++; }while(tmp!=1); return res; */ }; auto naive=[&](Int n){ vector as=identity(2*n); Int cnt=0; do{ cnt++; vector bs(as); for(Int i=0;i>T; while(T--){ Int n; cin>>n; cout<