#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vb = vector<bool>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using vd = vector<double>;
using vvd = vector<vd>;
using vvvd = vector<vvd>;
using vpii = vector<pii>;
using vvpii = vector<vpii>;
using vvvpii = vector<vvpii>;
void Main() {
  int n;
  cin >> n;
  vector<vb> m(n, vb(n, true));
  for (int h = 3; h <= n; h += 2) {
    bool a = (h / 2 % 2 == 1);
    int y = (n - h) / 2;
    int x = y;
    for (int i = int(0); i < int(h - 1); ++i) {
      a = !a;
      m[y][x] = a;
      y++;
    }
    for (int i = int(0); i < int(h - 1); ++i) {
      a = !a;
      m[y][x] = a;
      x++;
    }
    for (int i = int(0); i < int(h - 1); ++i) {
      a = !a;
      m[y][x] = a;
      y--;
    }
    for (int i = int(0); i < int(h - 1); ++i) {
      a = !a;
      m[y][x] = a;
      x--;
    }
  }
  int o = 1;
  int e = 2;
  for (int i = int(0); i < int(n); ++i) {
    for (int j = int(0); j < int(n); ++j) {
      int& x = (m[i][j] ? o : e);
      cout << x << ' ';
      x += 2;
    }
    cout << endl;
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  Main();
  return 0;
}
