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