#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const int N = 1e6 + 5;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i <= 2 * n; i++) {
    for (int j = 0; j < 2 * abs(n - i); j++) cout << " ";
    int cnt = 0;
    for (int j = 0; j <= 2 * n - 2 * abs(n - i); j++) {
      if (j != 0) cout << " ";
      cout << cnt;
      if (j >= n - abs(n - i))
        cnt--;
      else
        cnt++;
    }
    cout << endl;
  }
  return 0;
}
