#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  void solve() {
    int n;
    cin >> n;
    if (n < 3) {
      cout << "-1\n";
      return;
    }
    vector<vector<int>> a(n, vector<int>(n, -1));
    int k = 1, c = (n == 3) ? 0 : 1;
    a[n - 1][n - 1] = n * n;
    a[n - 2][0] = n * n - 1;
    for (int i = 0; i < n; i++) {
      a[i][c] = k++;
      if (i == n - 1) {
        for (int j = n - 2; j >= 0; j--) {
          if (a[i][j] == -1) {
            a[i][j] = k++;
            c = j;
          }
        }
      } else {
        for (int j = 0; j < n - 1; j++) {
          if (a[i][j] == -1) {
            a[i][j] = k++;
            c = j;
          }
        }
      }
    }
    for (int i = 0; i < n - 1; i++) {
      a[i][n - 1] = k++;
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) cout << a[i][j] << " ";
      cout << "\n";
    }
    return;
  };
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  Solution solution;
  solution.solve();
  return 0;
}
