#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  if (n == 1 || n == 2) {
    cout << -1;
    return;
  } else if (n == 3) {
    cout << 2 << " " << 8 << " " << 3 << "\n";
    cout << 5 << " " << 1 << " " << 6 << " "
         << "\n";
    cout << 4 << " " << 7 << " " << 9 << "\n";
    return;
  }
  vector<vector<int>> board(n, vector<int>(n));
  int used = 0;
  for (int i = 0; i < n - 3; ++i) {
    if (i % 2 == 0) {
      for (int j = 0; j < n - i; ++j) {
        ++used;
        board[j][i] = used;
      }
      for (int j = i + 1; j < n; ++j) {
        ++used;
        board[n - 1 - i][j] = used;
      }
    } else {
      for (int j = n - 1; j >= i; --j) {
        ++used;
        board[n - 1 - i][j] = used;
      }
      for (int j = n - i - 2; j >= 0; --j) {
        ++used;
        board[j][i] = used;
      }
    }
  }
  int k = n * n - 9;
  board[0][n - 3] = k + 1;
  board[1][n - 2] = k + 2;
  board[0][n - 2] = k + 3;
  board[1][n - 3] = k + 4;
  board[2][n - 2] = k + 5;
  board[2][n - 1] = k + 6;
  board[0][n - 1] = k + 7;
  board[2][n - 3] = k + 8;
  board[1][n - 1] = k + 9;
  if (n % 2 == 0) {
    swap(board[0][n - 3], board[2][n - 1]);
    swap(board[0][n - 2], board[1][n - 1]);
    swap(board[1][n - 3], board[2][n - 2]);
  }
  for (auto i : board) {
    for (auto j : i) cout << j << " ";
    cout << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
