#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool cmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
template <typename T>
inline bool cmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
const int _ = 555;
int N, a[_][_], n;
int main() {
  scanf("%d", &N);
  if (N <= 2) return printf("-1"), 0;
  if (N == 3) return printf("3 2 4\n8 6 5\n7 1 9\n"), 0;
  for (int i(1), I(N - 2); i <= I; ++i) {
    if ((N - i) & 1)
      for (int j(N), I(1); j >= I; --j) a[i][j] = ++n;
    else
      for (int j(1), I(N); j <= I; ++j) a[i][j] = ++n;
  }
  a[N - 1][N] = ++n;
  for (int i(N - 3), I(1); i >= I; --i) a[N - 1][i] = ++n;
  for (int i(1), I(N - 3); i <= I; ++i) a[N][i] = ++n;
  a[N][N - 1] = ++n, a[N - 1][N - 1] = ++n, a[N][N - 2] = ++n;
  a[N - 1][N - 2] = ++n, a[N][N] = ++n;
  for (int i(1), I(N); i <= I; ++i) {
    for (int j(1), I(N); j <= I; ++j) printf("%d ", a[i][j]);
    printf("\n");
  }
  return 0;
}
