#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = -n; i <= n; i++) {
    int flag = 0;
    for (int j = -n; j <= n; j++) {
      if (fabs(i) + fabs(j) > n)
        cout << " ";
      else {
        cout << n - fabs(i) - fabs(j);
        if (n - fabs(i) - fabs(j) == 0) {
          if (flag == 1 || i == -n || i == n) {
            cout << "\n";
            break;
          } else
            flag++;
        }
      }
      cout << " ";
    }
  }
  return 0;
}
