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