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