#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  if (n < 3) {
    cout << "-1\n";
    return 0;
  }
  for (int i = 0; i < n - 3; i++) {
    for (int j = 1; j <= n; j++) {
      if ((n % 2 && !(i % 2)) || (!(n % 2) && i % 2))
        cout << j + i * n << " ";
      else
        cout << (i + 1) * n - j + 1 << " ";
    }
    cout << "\n";
  }
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < n - 3; j++) {
      cout << n * n - 9 - i * (n - 3) - j << " ";
    }
    if (i == 0)
      cout << 1 + n * n - 9 << " " << 7 + n * n - 9 << " " << 9 + n * n - 9
           << "\n";
    if (i == 1)
      cout << 3 + n * n - 9 << " " << 2 + n * n - 9 << " " << 5 + n * n - 9
           << "\n";
    if (i == 2)
      cout << 4 + n * n - 9 << " " << 8 + n * n - 9 << " " << 6 + n * n - 9
           << "\n";
  }
  return 0;
}
