#include <bits/stdc++.h>
using namespace std;
const long long Mod = 1e9 + 7;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= Mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % Mod;
    a = a * a % Mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int N = 600;
int a[][3] = {{9, 5, 6}, {7, 2, 8}, {1, 3, 4}};
int ans[N][N];
int main() {
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  if (n <= 2) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      ans[i][j] = a[i][j] + n * n - 9;
    }
  }
  int cu = 1 + n * n - 9;
  for (int i = 3; i < n; i++) {
    if ((i & 1) == 0) {
      for (int j = 0; j <= i; j++) {
        ans[j][i] = --cu;
      }
      for (int j = i - 1; j >= 0; j--) {
        ans[i][j] = --cu;
      }
    } else {
      for (int j = 0; j <= i; j++) {
        ans[i][j] = --cu;
      }
      for (int j = i - 1; j >= 0; j--) {
        ans[j][i] = --cu;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cout << ans[i][j] << " ";
    }
    cout << endl;
  }
  return 0;
}
