#include <bits/stdc++.h>
using namespace std;
const int M = 505;
int og[3][3] = {{1, 3, 2}, {5, 6, 9}, {8, 4, 7}};
int g[M][M];
int main() {
  int n;
  scanf("%d", &n);
  if (n <= 2) {
    puts("-1");
    return 0;
  }
  int l = n - 3;
  int f = l & 1;
  int p = 0;
  for (int i = 0; i < l; i++, f ^= 1) {
    if (!f) {
      for (int j = 0; j < n - i; j++) g[j][i] = ++p;
      for (int j = i + 1; j < n; j++) g[n - i - 1][j] = ++p;
    } else {
      for (int j = n - 1; j > i; j--) g[n - i - 1][j] = ++p;
      for (int j = n - i - 1; j >= 0; j--) g[j][i] = ++p;
    }
  }
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 3; j++) g[i][j + l] = og[i][j] + p;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      printf("%d%c", g[i][j], j == n - 1 ? '\n' : ' ');
  return 0;
}
