#include <bits/stdc++.h>
using namespace std;
int i, j, n, p, a[516][516];
int main() {
  cin >> n;
  if (n < 3)
    cout << -1;
  else {
    if (~n & 1)
      j = n - 1;
    else
      i = n - 1;
    for (; i < n - 3 || j < n - 3;) {
      if (i > n - 2) {
        for (; i > j; i--) a[i][j] = ++p;
        for (; j < n - 1; j++) a[i][j] = ++p;
        a[i++][j] = ++p;
      } else {
        for (; j > i; j--) a[i][j] = ++p;
        for (; i < n - 1; i++) a[i][j] = ++p;
        a[i][j++] = ++p;
      }
    }
    a[n - 3][n - 3] = n * n - 1;
    a[n - 3][n - 2] = n * n - 2;
    a[n - 3][n - 1] = n * n - 5;
    a[n - 2][n - 3] = n * n - 7;
    a[n - 2][n - 2] = n * n - 6;
    a[n - 2][n - 1] = n * n - 3;
    a[n - 1][n - 3] = n * n - 8;
    a[n - 1][n - 2] = n * n;
    a[n - 1][n - 1] = n * n - 4;
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) cout << a[i][j] << ' ';
      cout << endl;
    }
  }
}
