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...
x=int(input())
l=x
m=2*x+1
arr = [[" " for _ in range(m)] for _ in range(m)]
left=right=l
while(x>=0):
    up=down=l
    y=x
    while(y>=0):
        arr[up][left]=str(y)
        arr[up][right]=str(y)
        arr[down][left]=str(y)
        arr[down][right]=str(y)
        y-=1
        up-=1
        down+=1
    x-=1
    left-=1
    right+=1
arr1=[" ".join(i) for i in arr]
arr1=[i.rstrip() for i in arr1]
arr2="\n".join(arr1)
print(arr2)