#include <bits/stdc++.h>
using namespace std;
int n, a[505][505], x, y, z, i, j;
int main() {
  scanf("%d", &n);
  if (n == 1 || n == 2) {
    printf("%d", -1);
    return 0;
  }
  if (n >= 4) {
    for (i = 4; i <= n; i++) {
      a[1][i] = i - 3;
      a[2][i] = 2 * n - 2 - i;
      a[3][i] = 2 * n - 9 + i;
    }
    for (i = n; i > 0; i--)
      for (j = 4; j <= n; j++) {
        if ((n - i) % 2 == 0)
          a[j][i] = 3 * n + j - 12 + (n - 3) * (n - i);
        else
          a[j][i] = 4 * n - 8 - j + (n - 3) * (n - i);
      }
  }
  a[1][1] = n * n - 8;
  a[1][2] = n * n - 1;
  a[1][3] = n * n - 6;
  a[2][1] = n * n - 4;
  a[2][2] = n * n - 7;
  a[2][3] = n * n - 5;
  a[3][1] = n * n;
  a[3][2] = n * n - 2;
  a[3][3] = n * n - 3;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) printf("%d ", a[i][j]);
    cout << endl;
  }
}
