#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int b = n, c = 0, d = 0;
  for (int i = 1; i <= 2 * n + 1; i++) {
    for (int j = 1; j <= b; j++) cout << "  ";
    for (int j = 1; j <= c * 2 + 1; j++) {
      (j == c * 2 + 1) ? cout << d : cout << d << " ";
      (j >= c + 1) ? d-- : d++;
    }
    cout << endl;
    d = 0;
    (i >= n + 1) ? b++ : b--;
    (i >= n + 1) ? c-- : c++;
  }
  return 0;
}
