#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int a[N][N];
void solve() {
  int n;
  cin >> n;
  for (int i = 0; i < n / 2; ++i) {
    int len = n / 2 - i;
    for (int j = 0; j < len; ++j) {
      int x1 = i, x2 = n - 1 - i;
      int y1 = j, y2 = n - 1 - j;
      a[x1][y1] = 1;
      a[x1][y2] = 1;
      a[x2][y1] = 1;
      a[x2][y2] = 1;
    }
  }
  int odd = 1, even = 2;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (a[i][j])
        a[i][j] = even, even += 2;
      else
        a[i][j] = odd, odd += 2;
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      cout << a[i][j] << " ";
    }
    cout << '\n';
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
