#include <bits/stdc++.h>
using namespace std;
const int64_t inf = 1e18;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int64_t n;
  cin >> n;
  if (n == 1 || n == 2) {
    cout << -1;
    return 0;
  }
  vector<vector<int64_t>> grid;
  grid.assign(n, vector<int64_t>(n));
  int64_t num = 1;
  for (int64_t i = 0; i < 3; i++) {
    for (int64_t j = 3; j < n; j++) {
      grid[i][j] = num;
      num++;
    }
  }
  for (int64_t i = 3; i < n; i++) {
    for (int64_t j = 0; j < n; j++) {
      grid[i][j] = num;
      num++;
    }
  }
  swap(grid[n - 1][1], grid[n - 1][n - 1]);
  grid[1][1] = num;
  num++;
  grid[0][2] = num;
  num++;
  grid[1][2] = num;
  num++;
  grid[2][2] = num;
  num++;
  grid[2][0] = num;
  num++;
  grid[1][0] = num;
  num++;
  grid[0][1] = num;
  num++;
  grid[0][0] = num;
  num++;
  grid[2][1] = num;
  num++;
  for (auto i : grid) {
    for (auto j : i) cout << j << ' ';
    cout << '\n';
  }
}
