#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using matr = vector<vector<ll>>;
using dbl = long double;
using ui = unsigned int;
mt19937 rnd;
ll random(ll limit) {
  uniform_int_distribution<ll> uniform_dist(0, limit);
  return uniform_dist(rnd);
}
ll bpow(ll a, ll b, ll mod) {
  ll res = 1;
  while (b > 0) {
    if (b % 2) {
      res *= a;
      res %= mod;
    }
    a *= a;
    a %= mod;
    b /= 2;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n;
  m = n;
  if (n <= 2) {
    cout << -1;
    return 0;
  }
  vector<vector<int>> x(n, vector<int>(m));
  if (n % 2 == 0) {
    int t = 1;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) {
        for (int j = 1; j < m; j++) {
          if (i != 0 || j != 1) {
            x[i][j] = t;
            t++;
          }
        }
      } else {
        for (int j = m - 1; j > 0; j--) {
          if (i != 0 || j != 1) {
            x[i][j] = t;
            t++;
          }
        }
      }
    }
    for (int i = n - 2; i >= 0; i--) {
      x[i][0] = t;
      t++;
    }
    x[n - 1][0] = t;
    t++;
    x[0][1] = t;
    t++;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        cout << x[i][j] << ' ';
      }
      cout << '\n';
    }
  } else {
    int t = 1;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) {
        for (int j = 0; j < m - 1; j++) {
          if (i != 0 || j != m - 2) {
            x[i][j] = t;
            t++;
          }
        }
      } else {
        for (int j = m - 2; j >= 0; j--) {
          if (i != 0 || j != m - 2) {
            x[i][j] = t;
            t++;
          }
        }
      }
    }
    for (int i = n - 2; i >= 0; i--) {
      x[i][m - 1] = t;
      t++;
    }
    x[n - 1][m - 1] = t;
    t++;
    x[0][m - 2] = t;
    t++;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        cout << x[i][j] << ' ';
      }
      cout << '\n';
    }
  }
}
