#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
T gcd(T a, T b) {
  return a ? gcd(b % a, a) : b;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T sgn(T a) {
  return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
int n;
int m;
int main() {
  scanf("%d", &n);
  int even = 2, odd = 1;
  for (int i = 0; i < n; i++, printf("\n"))
    for (int j = 0; j < n; j++) {
      if (abs(i - n / 2) + abs(j - n / 2) > n / 2)
        printf("%d ", even), even += 2;
      else
        printf("%d ", odd), odd += 2;
    }
  return 0;
}
