#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int odd = 1;
  int even = 2;
  for (int i = 0; i < n; i++) {
    int a = 0;
    int b = 0;
    int j = 0;
    if (2 * i + 1 <= n) {
      j = i;
    } else {
      j = n - i - 1;
    }
    a = 2 * j + 1;
    b = (n - a) / 2;
    for (int l = 0; l < b; l++) {
      cout << even << " ";
      even += 2;
    }
    for (int l = 0; l < a; l++) {
      cout << odd << " ";
      odd += 2;
    }
    for (int l = 0; l < b; l++) {
      cout << even << " ";
      even += 2;
    }
    cout << endl;
  }
  return 0;
}
