#include <bits/stdc++.h>
using namespace std;
int const nmax = 500;
int v[1 + nmax][1 + nmax];
int sol[16] = {4, 3, 6, 12, 7, 5, 9, 15, 14, 1, 11, 10, 13, 8, 16, 2};
int main() {
  int n;
  cin >> n;
  if (n <= 2)
    cout << -1;
  else if (n == 3) {
    cout << 1 << " " << 2 << " " << 4 << '\n';
    cout << 5 << " " << 3 << " " << 8 << '\n';
    cout << 9 << " " << 6 << " " << 7 << '\n';
  } else {
    int ptr = 0;
    int ptr2 = 0;
    if (n % 2 == 0)
      for (int i = n - 3; i <= n; i++)
        for (int j = 1; j <= 4; j++) v[i][j] = 1 * (n * n - 16) + sol[ptr++];
    else
      for (int i = n; n - 3 <= i; i--)
        for (int j = 4; 1 <= j; j--) v[i][j] = 1 * (n * n - 16) + sol[ptr++];
    for (int i = n; 4 <= i; i--) {
      if ((n - i) % 2 == 0) {
        for (int j = 1; j <= n; j++)
          if (v[n - i + 1][j] == 0) v[n - i + 1][j] = ++ptr2;
        for (int i2 = 1; i2 <= n; i2++)
          if (v[i2][i] == 0) v[i2][i] = ++ptr2;
      } else {
        for (int i2 = n; 1 <= i2; i2--)
          if (v[i2][i] == 0) v[i2][i] = ++ptr2;
        for (int j = n; 1 <= j; j--)
          if (v[n - i + 1][j] == 0) v[n - i + 1][j] = ++ptr2;
      }
    }
    if (n % 2 == 0)
      swap(v[n - 4][1], v[n - 4][2]);
    else if (n % 2 == 1)
      swap(v[n][5], v[n - 2][5]);
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) cout << v[i][j] << " ";
      cout << '\n';
    }
  }
  return 0;
}
