#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x = 0, y = 0, minus = 2, x1 = 0, y1 = 0, k = 0;
  cin >> n;
  for (int i = 0; i < 2 * n + 1; i++) {
    if (i <= n) {
      for (int j = 0; j < 2 * n + 1; j++) {
        if (j >= n - i and j <= n + i) {
          if (j <= n) {
            if (j == n)
              cout << x;
            else
              cout << x << " ";
            y = x;
            x++;
            y--;
          } else {
            if (j < 2 * n)
              cout << " " << y;
            else
              cout << " " << y;
            y--;
            if (y < 0) break;
          }
        } else {
          if (j <= n - i - 1) cout << "  ";
        }
      }
      cout << endl;
      k = i - 1;
    } else {
      int limit = 2 * n + 1;
      for (int j = 0; j < limit; j++) {
        if (j >= n - k and j <= n + k) {
          if (j <= n) {
            if (j == n)
              cout << x1;
            else
              cout << x1 << " ";
            y1 = x1;
            x1++;
            y1--;
          } else {
            if (j <= limit - 2)
              cout << " " << y1;
            else
              cout << " " << y1;
            y1--;
            if (y1 < 0) break;
          }
        } else {
          if (j <= n - k - 1) cout << "  ";
        }
      }
      limit--;
      k--;
      cout << endl;
    }
    x = 0;
    y = 0;
    x1 = 0;
    y1 = 0;
  }
  return 0;
}
