#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i <= n; i++) {
      int space = (n - i) * 2;
      for (int j = 0; j < space; j++) printf(" ");
      if (!i)
        printf("%d\n", 0);
      else {
        for (int j = 0; j <= i; j++) printf("%d ", j);
        for (int j = i - 1; j > 0; j--) printf("%d ", j);
        printf("%d\n", 0);
      }
    }
    for (int i = n - 1; i >= 0; i--) {
      int space = (n - i) * 2;
      for (int j = 0; j < space; j++) printf(" ");
      if (!i)
        printf("%d\n", 0);
      else {
        for (int j = 0; j <= i; j++) printf("%d ", j);
        for (int j = i - 1; j > 0; j--) printf("%d ", j);
        printf("%d\n", 0);
      }
    }
  }
  return 0;
}
