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