#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.);
struct str {
  int s;
} sss;
int abs(int a) { return (a < 0 ? -a : a); }
void sort(str a[], int l, int r);
int main() {
  int n;
  cin >> n;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j < n - i; j++) cout << "  ";
    for (int j = 0; j <= i; j++) {
      cout << j;
      if (j || j == 0 && i) cout << ' ';
    }
    for (int j = i - 1; j >= 0; j--) {
      cout << j;
      if (j) cout << ' ';
    }
    cout << endl;
  }
  for (int i = n - 1; i >= 0; i--) {
    for (int j = 0; j < n - i; j++) cout << "  ";
    for (int j = 0; j <= i; j++) {
      cout << j;
      if (j || j == 0 && i) cout << ' ';
    }
    for (int j = i - 1; j >= 0; j--) {
      cout << j;
      if (j) cout << ' ';
    }
    cout << endl;
  }
  return 0;
}
void sort(str a[], int l, int r) {
  int i = l, j = r;
  str x, tmp;
  x = a[(l + r) / 2];
  while (i < j) {
    while (a[i].s < x.s) i++;
    while (a[j].s > x.s) j--;
    if (i <= j) {
      tmp = a[i];
      a[i] = a[j];
      a[j] = tmp;
      i++;
      j--;
    }
  }
  if (j > l) sort(a, l, j);
  if (r > i) sort(a, i, r);
}
