#include <bits/stdc++.h>
using namespace std;
unsigned short abs(short x) {
  if (x >= 0)
    return x;
  else
    return -x;
}
int main(int argc, char *argv[]) {
  unsigned short n;
  cin >> n;
  string sp;
  for (int i = 0; i < n; i++) {
    for (int t = 0; t < 2 * abs(i - n); t++) cout << " ";
    for (int j = 0; j < (2 * n + 1 - 2 * abs(i - n)) - 1; j++)
      cout << abs(abs(i - j) - i) << " ";
    cout << abs(abs(i - (2 * n + 1 - 2 * abs(i - n))) - i) - 1;
    cout << endl;
  }
  for (int i = n; i >= 0; i--) {
    for (int t = 0; t < 2 * abs(i - n); t++) cout << " ";
    for (int j = 0; j < (2 * n + 1 - 2 * abs(i - n)) - 1; j++)
      cout << abs(abs(i - j) - i) << " ";
    cout << abs(abs(i - (2 * n + 1 - 2 * abs(i - n))) - i) - 1;
    cout << endl;
  }
  return 0;
}
