#include <bits/stdc++.h>
using namespace std;
const long long N = 2e3 + 5;
long long n, x, y, c, dxy[9] = {1, 2, 4, 5, 3, 8, 9, 6, 7}, acd[N][N];
signed main() {
  scanf("%lld", &n);
  if (n < 3) {
    printf("-1\n");
    return 0;
  }
  for (long long i = 1; i <= 3; i++)
    for (long long j = 1; j <= 3; j++)
      acd[i][j] = n * n - 9 + dxy[(i - 1) * 3 + j - 1];
  c = n * n - 9;
  for (long long i = 4; i <= n; i++)
    for (long long j = 1; j <= i * 2 - 1; j++) {
      y = i;
      x = j;
      if (j > i) {
        y -= j - i;
        x -= j - i;
      }
      if (i % 2) swap(y, x);
      acd[y][x] = c;
      c--;
    }
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= n; j++) printf("%lld ", acd[i][j]);
    puts("");
  }
  return 0;
}
