#include <bits/stdc++.h>
using namespace std;
int n;
string make(int x) {
  string str = "";
  int tmp = n - x;
  tmp *= 2;
  for (int i = 0; i < tmp; i++) {
    str += " ";
  }
  if (x == 0) {
    str += "0";
    return str;
  }
  for (int i = 0; i <= x; i++) {
    str += (char)(i + '0');
    str += " ";
  }
  for (int i = x - 1; i >= 0; i--) {
    str += (char)(i + '0');
    if (i == 0) {
      break;
    }
    str += " ";
  }
  return str;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  string str[n * 2];
  for (int i = 0; i <= n; i++) {
    str[i] = make(i);
    cout << str[i] << endl;
  }
  for (int i = n - 1; i >= 0; i--) {
    cout << str[i] << endl;
  }
}
