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