Vasya's birthday is approaching and Lena decided to sew a patterned handkerchief to him as a present. Lena chose digits from 0 to *n* as the pattern. The digits will form a rhombus. The largest digit *n* should be located in the centre. The digits should decrease as they approach the edges. For example, for *n* = 5 the handkerchief pattern should look like that: 

Your task is to determine the way the handkerchief will look like by the given *n*.
The first line contains the single integer *n* (2 ≤ *n* ≤ 9).
2
    0
  0 1 0
0 1 2 1 0
  0 1 0
    0
3
      0
    0 1 0
  0 1 2 1 0
0 1 2 3 2 1 0
  0 1 2 1 0
    0 1 0
      0
4
        0
      0 1 0
    0 1 2 1 0
  0 1 2 3 2 1 0
0 1 2 3 4 3 2 1 0
  0 1 2 3 2 1 0
    0 1 2 1 0
      0 1 0
        0
5
          0
        0 1 0
      0 1 2 1 0
    0 1 2 3 2 1 0
  0 1 2 3 4 3 2 1 0
0 1 2 3 4 5 4 3 2 1 0
  0 1 2 3 4 3 2 1 0
    0 1 2 3 2 1 0
      0 1 2 1 0
        0 1 0
          0
6
            0
          0 1 0
        0 1 2 1 0
      0 1 2 3 2 1 0
    0 1 2 3 4 3 2 1 0
  0 1 2 3 4 5 4 3 2 1 0
0 1 2 3 4 5 6 5 4 3 2 1 0
  0 1 2 3 4 5 4 3 2 1 0
    0 1 2 3 4 3 2 1 0
      0 1 2 3 2 1 0
        0 1 2 1 0
          0 1 0
            0
7
              0
            0 1 0
          0 1 2 1 0
        0 1 2 3 2 1 0
      0 1 2 3 4 3 2 1 0
    0 1 2 3 4 5 4 3 2 1 0
  0 1 2 3 4 5 6 5 4 3 2 1 0
0 1 2 3 4 5 6 7 6 5 4 3 2 1 0
  0 1 2 3 4 5 6 5 4 3 2 1 0
    0 1 2 3 4 5 4 3 2 1 0
      0 1 2 3 4 3 2 1 0
        0 1 2 3 2 1 0
          0 1 2 1 0
            0 1 0
              0
8
                0
              0 1 0
            0 1 2 1 0
          0 1 2 3 2 1 0
        0 1 2 3 4 3 2 1 0
      0 1 2 3 4 5 4 3 2 1 0
    0 1 2 3 4 5 6 5 4 3 2 1 0
  0 1 2 3 4 5 6 7 6 5 4 3 2 1 0
0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0
  0 1 2 3 4 5 6 7 6 5 4 3 2 1 0
    0 1 2 3 4 5 6 5 4 3 2 1 0
      0 1 2 3 4 5 4 3 2 1 0
        0 1 2 3 4 3 2 1 0
          0 1 2 3 2 1 0
            0 1 2 1 0
              0 1 0
                0
9
                  0
                0 1 0
              0 1 2 1 0
            0 1 2 3 2 1 0
          0 1 2 3 4 3 2 1 0
        0 1 2 3 4 5 4 3 2 1 0
      0 1 2 3 4 5 6 5 4 3 2 1 0
    0 1 2 3 4 5 6 7 6 5 4 3 2 1 0
  0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0
0 1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1 0
  0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0
    0 1 2 3 4 5 6 7 6 5 4 3 2 1 0
      0 1 2 3 4 5 6 5 4 3 2 1 0
        0 1 2 3 4 5 4 3 2 1 0
          0 1 2 3 4 3 2 1 0
            0 1 2 3 2 1 0
              0 1 2...
import sys 
input = sys.stdin.readline 
from collections import Counter
def instr():
    return input()[:-1]
############################
n  = int(input())
bottom = 2*n + 1
m = 0
b = 0
r = 0
for i in range(1, bottom + 1):
    r = bottom - i+1
    m = min(r, i)
    b = bottom //2 - i + 1
    
    for j in range(max(b, 0-b)):
        print("  ", end= "")
    for z in range(m): 
        print(z, end= " ")
    for z in range(m-2, -1, -1):
        print(z, end = " ")
    print()