#include <bits/stdc++.h>
int main() {
  int i, j, k, ecnt, ocnt, n;
  static int e[2048], o[2048];
  scanf("%d", &n);
  for (i = 2; i <= n * n; i += 2) e[i / 2 - 1] = i;
  for (i = 1; i <= n * n; i += 2) o[i / 2] = i;
  ecnt = ocnt = 0;
  for (i = 1; i <= n; i++) {
    k = (n - 2 * i + 1) / 2;
    if (k < 0) k = -k;
    for (j = 0; j < k; j++) printf("%d ", e[ecnt++]);
    for (j = 0; j < n - 2 * k; j++) printf("%d ", o[ocnt++]);
    for (j = 0; j < k; j++) printf("%d ", e[ecnt++]);
    printf("\n");
  }
  return 0;
}
