#include using namespace std; int main(){ int N; cin >> N; vector> ans(N, vector(N)); if (N%2 == 1 && N != 3) cout << -1 << endl; else if (N%2 == 1){ cout << 1 << " " << 4 << " " << 8 << endl; cout << 6 << " " << 2 << " " << 3 << endl; cout << 7 << " " << 5 << " " << 9 << endl; } else { bool flag = true; int current_x = 0, current_y = 0; int cnt = 1; for (int i=0; i