#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const int INF = 1e9 + 9;
const int MOD = 1e9 + 7;
int n, a[60][60];
queue<int> qo, qe;
int main() {
  cin >> n;
  for (int i = 1, _b = (n * n); i <= _b; i++)
    if (i % 2)
      qo.push(i);
    else
      qe.push(i);
  int mid = (n / 2) + 1;
  for (int i = 1, _b = (n); i <= _b; i++) {
    int no = (mid - abs(mid - i)) * 2 - 1;
    int z = no;
    for (int j = 1, _b = (n); j <= _b; j++)
      if (j >= mid - (no / 2) && z > 0) {
        a[i][j] = qo.front();
        qo.pop();
        z--;
      } else {
        a[i][j] = qe.front();
        qe.pop();
      }
  }
  for (int i = 1, _b = (n); i <= _b; i++) {
    for (int j = 1, _b = (n); j <= _b; j++) cout << a[i][j] << " ";
    cout << endl;
  }
}
