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