#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const int maxn = 500 + 7;
int ma[maxn][maxn];
int n;
int main() {
  scanf("%d", &n);
  if (n <= 2) {
    printf("-1");
    return 0;
  }
  int now = n * n;
  int cnt = 9;
  ma[1][1] = 6;
  ma[1][2] = 7;
  ma[1][3] = 9;
  ma[2][1] = 5;
  ma[2][2] = 8;
  ma[2][3] = 2;
  ma[3][1] = 1;
  ma[3][2] = 4;
  ma[3][3] = 3;
  for (int i = (4); i <= (n); i++) {
    if (i % 2 == 0) {
      for (int j = (1); j <= (i); j++) ma[j][i] = ++cnt;
      for (int j = (i - 1); j >= (1); j--) ma[i][j] = ++cnt;
    } else {
      for (int j = (1); j <= (i); j++) ma[i][j] = ++cnt;
      for (int j = (i - 1); j >= (1); j--) ma[j][i] = ++cnt;
    }
  }
  for (int i = (1); i <= (n); i++) {
    for (int j = (1); j <= (n); j++) {
      printf("%d%c", n * n - ma[i][j] + 1, " \n"[j == n]);
    }
  }
  return 0;
}
