#include <bits/stdc++.h>
using namespace std;
int a[505][505];
int main() {
  int n;
  cin >> n;
  if (n <= 2) {
    cout << -1 << endl;
    return 0;
  }
  int cnt = 0;
  for (int i = n; i > 3; i--) a[1][i] = ++cnt;
  for (int i = 4; i <= n; i++) a[2][i] = ++cnt;
  for (int row = 3; row < n; row++)
    if (row % 2 == 1)
      for (int col = n; col > 0; col--) a[row][col] = ++cnt;
    else
      for (int col = 1; col <= n; col++) a[row][col] = ++cnt;
  if (n % 2 == 1) {
    for (int i = n; i > 0; i--)
      if (i != 2) a[n][i] = ++cnt;
  } else {
    for (int i = 1; i <= n; i++)
      if (i != 2) a[n][i] = ++cnt;
  }
  a[n][2] = ++cnt;
  a[1][2] = ++cnt;
  a[2][1] = ++cnt;
  a[2][2] = ++cnt;
  a[1][3] = ++cnt;
  a[2][3] = ++cnt;
  a[1][1] = ++cnt;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) printf("%d ", a[i][j]);
    printf("\n");
  }
  return 0;
}
