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