#include <bits/stdc++.h>
using namespace std;
int mat[100][100];
int di[5] = {1, 0, 0, -1};
int dj[5] = {0, 1, -1, 0};
int main() {
  int n;
  scanf("%d", &n);
  int N = (2 * n) + 1;
  queue<pair<int, int>> q;
  q.push({N / 2, N / 2});
  mat[N / 2][N / 2] = n + 1;
  while (!q.empty()) {
    pair<int, int> act = q.front();
    q.pop();
    for (int k = 0; k < 4; k++) {
      int pi = act.first + di[k];
      int pj = act.second + dj[k];
      if (mat[pi][pj] == 0) {
        if (pi >= 0 and pi < N and pj >= 0 and pj < N) {
          int num = mat[act.first][act.second] - 1;
          mat[pi][pj] = num;
          if (num > 1) {
            q.push({pi, pj});
          }
        }
      }
    }
  }
  bool f = true;
  for (int i = 0; i < N; i++) {
    f = false;
    bool cero = false;
    for (int j = 0; j < N; j++) {
      if (mat[i][j] > 0) {
        printf("%d", mat[i][j] - 1);
        if ((mat[i][j] > 1 or !cero) and i > 0 and i < N - 1) printf(" ");
        if (mat[i][j] == 1) cero = 1;
        f = true;
      } else if (!f) {
        printf("  ");
      }
    }
    printf("\n");
  }
  return 0;
}
