#include <bits/stdc++.h>
using namespace std;
int a[1005][1005], n;
int main() {
  cin >> n;
  a[1][1] = 7;
  a[1][2] = 6;
  a[1][3] = 9;
  a[2][1] = 2;
  a[2][2] = 3;
  a[2][3] = 5;
  a[3][1] = 1;
  a[3][2] = 8;
  a[3][3] = 4;
  if (n == 2) {
    puts("-1");
    return 0;
  }
  int now = n * n - 9;
  for (int i = 4; i <= n; i++) {
    if (i % 2 == 0) {
      for (int j = 1; j <= i; j++) a[i][j] = now--;
      for (int j = i - 1; j >= 1; j--) a[j][i] = now--;
    } else {
      for (int j = 1; j <= i; j++) a[j][i] = now--;
      for (int j = i - 1; j >= 1; j--) a[i][j] = now--;
    }
  }
  for (int i = 1; i <= 3; i++)
    for (int j = 1; j <= 3; j++) a[i][j] += n * n - 9;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) cout << a[i][j] << " ";
    puts("");
  }
}
