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