#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, s = 1, ans = 0;
  scanf("%lld", &n);
  for (int i = -n; i <= n; i++) {
    m = n - abs(i);
    for (int j = 0; j < abs(i); j++) cout << "  ";
    for (int k = 0; k < m; k++) cout << k << " ";
    for (int l = m; l > 0; l--) cout << l << " ";
    cout << "0" << endl;
  }
  return 0;
}
