#include <bits/stdc++.h>
using namespace std;
int a[101][101];
void rec(int x, int y) {
  if (x - 1 > 0 && a[x][y] > a[x - 1][y]) {
    a[x - 1][y] = a[x][y] - 1;
    rec(x - 1, y);
  }
  if (a[x][y] > a[x + 1][y]) {
    a[x + 1][y] = a[x][y] - 1;
    rec(x + 1, y);
  }
  if (y - 1 > 0 && a[x][y] > a[x][y - 1]) {
    a[x][y - 1] = a[x][y] - 1;
    rec(x, y - 1);
  }
  if (a[x][y + 1] < a[x][y]) {
    a[x][y + 1] = a[x][y] - 1;
    rec(x, y + 1);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n * 2 + 1; i++) {
    for (int j = 1; j <= n * 2 + 1; j++) {
      a[i][j] = 0;
    }
  }
  a[n + 1][n + 1] = n;
  rec(n + 1, n + 1);
  for (int i = 1; i <= n * 2 + 1; i++) {
    bool ok = 0;
    for (int j = 1; j <= n * 2 + 1; j++) {
      if ((i == 1 || i == 2 * n + 1) && j == n + 1) {
        if (j != 1) {
          cout << ' ';
        }
        cout << 0;
        break;
      }
      if (a[i][j] == 0 && (a[i][j + 1] <= 0 && a[i][j - 1] <= 0)) {
        a[i][j] = -1;
      }
      if (a[i][j] == -1) {
        if (ok == 1) {
          break;
        }
        if (j != 1) {
          cout << ' ';
        }
        cout << ' ';
      } else {
        if (j != 1) {
          cout << ' ';
        }
        cout << a[i][j];
        ok = 1;
      }
    }
    cout << endl;
  }
  return 0;
}
