#include <bits/stdc++.h>
using namespace std;
using ll = int_fast64_t;
constexpr int mod = 1e9 + 7;
constexpr int inf = (1 << 30) - 1;
constexpr ll infll = (1LL << 61) - 1;
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
int main() {
  int N;
  cin >> N;
  vector<vector<int>> a(N, vector<int>(N, 1));
  for (int i = 0; i < N / 2; i++) {
    int mx = N / 2 - i;
    for (int j = 0; j < mx; j++) {
      a[i][j] = 0;
      a[i][N - j - 1] = 0;
    }
  }
  for (int i = 0; i < N / 2; i++) {
    int mx = N / 2 - i;
    for (int j = 0; j < mx; j++) {
      a[N - i - 1][j] = 0;
      a[N - i - 1][N - j - 1] = 0;
    }
  }
  int even = 2, odd = 1;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      a[i][j] = (a[i][j] % 2 == 0 ? even : odd);
      cout << a[i][j] << " ";
      (a[i][j] % 2 == 0 ? even : odd) += 2;
    }
    cout << "\n";
  }
}
