#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n;
  cin >> n;
  if (n < 3) {
    cout << -1 << endl;
    exit(0);
  }
  vector<vector<long long>> m(n, vector<long long>(n));
  m[n - 3][n - 3] = n * n - 7, m[n - 3][n - 2] = n * n - 0,
               m[n - 3][n - 1] = n * n - 8;
  m[n - 2][n - 3] = n * n - 6, m[n - 2][n - 2] = n * n - 5,
               m[n - 2][n - 1] = n * n - 4;
  m[n - 1][n - 3] = n * n - 3, m[n - 1][n - 2] = n * n - 2,
               m[n - 1][n - 1] = n * n - 1;
  long long val = n * (n - 3) + 1;
  for (long long i = 0; i < n - 3; ++i) m[i][n - 3] = val++;
  for (long long i = n - 4; i >= 0; --i) m[i][n - 2] = val++;
  for (long long i = 0; i < n - 3; ++i) m[i][n - 1] = val++;
  val = n * (n - 3);
  long long down = 1;
  for (long long j = n - 4; j >= 0; --j) {
    if (down)
      for (long long i = 0; i < n; ++i) m[i][j] = val--;
    else
      for (long long i = n - 1; i >= 0; --i) m[i][j] = val--;
    down ^= 1;
  }
  for (long long i = 0; i < n; ++i) {
    for (long long j : m[i]) cout << j << " ";
    cout << '\n';
  }
}
