#include <bits/stdc++.h>
using namespace std;
int n, a[510][510];
int main() {
  cin >> n;
  if (n <= 2) {
    printf("-1\n");
    return 0;
  }
  int i, j, cnt = 1;
  for (i = 1; i < n; i++) {
    if (i % 2) {
      for (j = 1; j <= n - i; j++) a[i][j] = cnt++;
      for (j = i + 1; j <= n - 1; j++) a[j][n - i] = cnt++;
    } else {
      for (j = n - 1; j >= i + 1; j--) a[j][n - i] = cnt++;
      for (j = n - i; j >= 1; j--) a[i][j] = cnt++;
    }
  }
  for (i = 2; i < n; i++) a[n][i] = cnt++;
  for (i = 1; i <= n - 2; i++) a[i][n] = cnt++;
  a[n][n] = cnt++;
  a[n - 1][n] = cnt++;
  a[n][1] = cnt++;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) printf("%d ", a[i][j]);
    printf("\n");
  }
  return 0;
}
