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