#include using namespace std; using ll=long long; using pii=pair; #define all(a) a.begin(),a.end() #define pb push_back #define sz(a) ((int)a.size()) vector> a[10]; signed main(){ ios_base::sync_with_stdio(0),cin.tie(0); int n; cin >> n; if(n==1){ cout << "-1\n"; return 0; } a[2]={{7,14,0,8},{4,12,2,11},{15,9,6,1},{13,10,5,3}}; for(int k=3; k<=n; ++k){ a[k].assign(1<(1<>k-1) a[k][i][j]^=1<<(2*k-2); if(j>>k-1) a[k][i][j]^=1<<(2*k-1); } } for(int i=0; i<(1<