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