#include <bits/stdc++.h>
using namespace std;
int tmp, k, n;
int a[105][105];
int main() {
  memset(a, -1, sizeof(a));
  scanf("%d", &n);
  for (int i = 0; i <= 2 * n; i++) {
    tmp = i;
    if (tmp >= n) tmp = 2 * n - i;
    for (int k = 0; k < n - tmp; k++) printf("  ");
    if (tmp != 0)
      for (int k = 0; k <= tmp; k++) printf("%d ", k);
    for (int k = tmp - 1; k > 0; k--) printf("%d ", k);
    printf("0\n");
  }
  return 0;
}
