#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = n; i >= 0; i--) {
    for (int j = 0; j < 2 * i; j++) {
      cout << " ";
    }
    for (int k = 0; k <= n - i; k++) {
      if (k == 0 && i == n) {
        cout << k;
      } else {
        cout << k << " ";
      }
    }
    for (int v = (n - i) - 1; v >= 0; v--) {
      if (v != -1) {
        if (v != 0) {
          cout << v << " ";
        } else {
          cout << v;
        }
      }
    }
    cout << endl;
  }
  for (int x = 1; x <= n; x++) {
    for (int z = 2 * x; z > 0; z--) {
      cout << " ";
    }
    for (int y = 0; y <= n - x; y++) {
      if (y == 0 && x == n) {
        cout << y;
      } else {
        cout << y << " ";
      }
    }
    for (int a = (n - x) - 1; a >= 0; a--) {
      if (a == 0) {
        cout << a;
      } else {
        cout << a << " ";
      }
    }
    if (x != n) {
      cout << endl;
    }
  }
  return 0;
}
