#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const double long pi = std::acos(-1);
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  if (n < 3) {
    cout << -1 << "\n";
    return 0;
  }
  vector<vector<int>> a(n + 1, vector<int>(n + 1, -1));
  int timer = 1;
  int t = n * n;
  for (int i = 1; i <= n; i += 1) {
    a[i][n] = t - i - 1;
  }
  a[n][n] = t - 1;
  a[1][n - 1] = t;
  for (int i = 1; i <= n; i += 1) {
    for (int j = 1; j <= n; j += 1) {
      if (a[i][j] == -1) {
        a[i][j] = timer++;
      }
    }
  }
  for (int i = 1; i <= n; i += 1) {
    for (int j = 1; j <= n; j += 1) {
      cout << a[i][j] << " ";
    }
    cout << "\n";
  }
}
