#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<vector<int> > v(n, vector<int>(n));
  int h = 1;
  for (int i = 0; i <= n / 2; i++) {
    for (int j = n / 2 - i; j < n / 2 + i + 1; j++) {
      v[i][j] = h;
      h += 2;
    }
  }
  for (int i = n - 1; i > n / 2; i--) {
    for (int j = n / 2 - (n - i - 1); j < n / 2 + (n - i - 1) + 1; j++) {
      v[i][j] = h;
      h += 2;
    }
  }
  h = 2;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (v[i][j] == 0) {
        v[i][j] = h;
        h += 2;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cout << v[i][j];
      if (j + 1 != n) cout << " ";
    }
    cout << "\n";
  }
  return 0;
}
