#include <bits/stdc++.h>
using namespace std;
int main(int argc, char **argv) {
  int t, n;
  cin >> n;
  int m = 2 * n + 1;
  for (int i = 0; i < m; i++) {
    if (i > n)
      t = 2 * n - i;
    else
      t = i;
    int k = n - t;
    ;
    for (int j = 0; j < k; j++) cout << "  ";
    for (int j = 0; j < t; j++) {
      if (j == 0)
        cout << j;
      else
        cout << " " << j;
    }
    if (t == 0)
      cout << t;
    else
      cout << " " << t;
    for (int j = t - 1; j >= 0; j--) cout << " " << j;
    cout << endl;
  }
}
