#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  int board[501][501];
  cin >> n;
  if (n < 3) {
    cout << "-1" << '\n';
  } else {
    int cont = 1;
    bool subo = 1;
    for (int j = (0); j < (n); j++) {
      subo = !subo;
      if (subo) {
        for (int i = (0); i < (n - 3); i++) {
          board[(n - 3) - 1 - i][j] = cont;
          cont++;
        }
      } else {
        for (int i = (0); i < (n - 3); i++) {
          board[i][j] = cont;
          cont++;
        }
      }
    }
    cont = n * (n - 3) + 1;
    for (int i = n - 3; i < n; i++) {
      for (int j = 3; j < n; j++) {
        board[i][j] = cont;
        cont++;
      }
    }
    int p = n * n - 9;
    board[n - 3][0] = p + 9;
    board[n - 3][1] = p + 5;
    board[n - 3][2] = p + 6;
    board[n - 2][0] = p + 4;
    board[n - 2][1] = p + 3;
    board[n - 2][2] = p + 7;
    board[n - 1][0] = p + 8;
    board[n - 1][1] = p + 2;
    board[n - 1][2] = p + 1;
    for (int i = (0); i < (n); i++) {
      for (int j = (0); j < (n); j++) {
        cout << board[i][j] << " ";
      }
      cout << endl;
    }
  }
  return 0;
}
