#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, e, o, u;
  cin >> x;
  for (int i = 0; i <= x; i++) {
    for (int q = x; q >= i + 1; q--) cout << "  ";
    for (e = 0; e <= i; e++) {
      if (i == 0)
        cout << e;
      else
        cout << e << " ";
    }
    for (int r = e - 2; (i >= 1 && r >= 0); r--) {
      if (r == 0)
        cout << r;
      else
        cout << r << " ";
    }
    cout << endl;
  }
  for (int t = 1; t <= x; t++) {
    for (int y = 1; y <= t; y++) cout << "  ";
    for (u = x, o = 0; u >= t; u--, o++) {
      if (t == x && o == 0)
        cout << o;
      else
        cout << o << " ";
    }
    for (int p = o - 2; (t != x && p >= 0); p--) {
      if (p == 0)
        cout << p;
      else
        cout << p << " ";
    }
    cout << endl;
  }
  return 0;
}
