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