#include #include using namespace std; using namespace atcoder; using ll=long long; using ldub=long double; using lldub=__float128; using str=string; using mint=modint; template using tup2=tuple; template using tup3=tuple; template using tup4=tuple; template using tup5=tuple; template using tup6=tuple; template using tup7=tuple; template using vec=vector; template using vec2=vector>; template using vec3=vector>; template using vec4=vector>; template using vec5=vector>; template using vec6=vector>; template using que=queue; template using Pque=priority_queue; template using pque=priority_queue, greater>; struct Edge{ ll from,to,w=1,num=-1; }; using gvec=vector; using gvec2=vector; template bool chmax(T &a,T b){if(a bool chmin(T &a,T b){if(b> N; if(N<=3){ cout << -1 << endl; return; } if((N&1)==0){ cout << 1 << ' ' << 2 << endl; cout << 1 << ' ' << N+1 << endl; cout << 2 << ' ' << N+2 << endl; cout << 3 << ' ' << 4 << endl; cout << 4 << ' ' << N+4 << endl; cout << N+2 << ' ' << N+3 << endl; cout << N+3 << ' ' << N+4 << endl; cout << N+3 << ' ' << 2*N+3 << endl; cout << 2*N+1 << ' ' << 2*N+2 << endl; cout << 2*N+1 << ' ' << 3*N+1 << endl; cout << 2*N+3 << ' ' << 2*N+4 << endl; cout << 2*N+3 << ' ' << 3*N+3 << endl; cout << 2*N+4 << ' ' << 3*N+4 << endl; cout << 3*N+1 << ' ' << 3*N+2 << endl; cout << 3*N+2 << ' ' << 3*N+3 << endl; for(ll p=4;p> T; while(T--) solve(); return 0; }