#include #include using namespace std; using namespace atcoder; #define rep(i, n) for(int i=0;i<(n);++i) #define rep1(i, n) for(int i=1;i<=(n);i++) #define ll long long using mint = modint998244353; using P = pair; using lb = long double; using T = tuple; #ifdef LOCAL # include # define dbg(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else # define dbg(...) (static_cast(0)) #endif int main() { int n; cin >> n; if(n==1) { cout << -1 << endl; return 0; } vector> a = {{7, 14, 0, 8} ,{4, 12, 2, 11} ,{15, 9, 6, 1} ,{13, 10, 5, 3}}; auto f = [&](auto f, int cnt) -> vector> { if(cnt==2) return a; auto b = f(f, cnt-1); int r = 1<<(cnt*2-1); int l = 1<<(cnt*2-2); vector> A(1<(1<> ret(1<(1<>0&1) add += r; if(j>>0&1) add += l; for(int k=0;k<1<<(cnt-1);k++)for(int t=0;t<1<<(cnt-1);t++) { if(i^j) { ret[i*(1<