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