#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFLL = 1e18;
const int MOD = 1e9 + 7;
const int MAXN = 5e2 + 5;
int M[MAXN][MAXN];
int x, n;
void fill(int i) {
  if (~i & 1) {
    for (int j = 0; j < (int)i; j++) M[j][i] = x--;
    for (int j = i; j > (int)-1; j--) M[i][j] = x--;
  } else {
    for (int j = 0; j < (int)i; j++) M[i][j] = x--;
    for (int j = i; j > (int)-1; j--) M[j][i] = x--;
  }
}
int main() {
  scanf("%d", &n);
  if (n < 3) {
    printf("-1\n");
    return 0;
  }
  x = n * n;
  M[0][0] = x--;
  M[1][2] = x--;
  M[1][0] = x--;
  M[0][2] = x--;
  M[0][1] = x--;
  M[2][2] = x--;
  M[2][1] = x--;
  M[1][1] = x--;
  M[2][0] = x--;
  for (int i = 3; i < (int)n; i++) fill(i);
  for (int i = 0; i < (int)n; i++)
    for (int j = 0; j < (int)n; j++) printf("%d%c", M[i][j], " \n"[j == n - 1]);
  return 0;
}
