#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int tot = 2 * n + 1;
    for (int i = 0; i < tot; i++) {
      int dif = abs(n - i);
      int frontSpaces = 2 * dif;
      while (frontSpaces--) {
        cout << " ";
      }
      int nums = (n - dif) * 2 + 1;
      int curVal = (n - dif);
      for (int j = 0; j < nums; j++) {
        if (j) {
          cout << " ";
        }
        cout << curVal - abs(curVal - j);
      }
      cout << endl;
    }
  }
  return 0;
}
