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