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