#include <bits/stdc++.h>
int main() {
  int n, i, j, k, space, num;
  scanf("%d", &n);
  space = n;
  for (i = 1; i <= n + 1; i++) {
    num = 0;
    for (j = 1; j <= space; j++) printf("  ");
    space--;
    for (k = 1; k < i; k++) {
      printf("%d", num);
      num++;
      printf(" ");
    }
    for (k = 1; k < i; k++) {
      printf("%d", num);
      num--;
      printf(" ");
    }
    printf("0\n");
  }
  space = 1;
  for (i = n; i > 0; i--) {
    num = 0;
    for (j = 1; j <= space; j++) printf("  ");
    space++;
    for (k = 1; k < i; k++) {
      printf("%d", num);
      num++;
      printf(" ");
    }
    for (k = 1; k < i; k++) {
      printf("%d", num);
      num--;
      printf(" ");
    }
    printf("0\n");
  }
  return 0;
}
