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