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...
#!/usr/bin/env python
# coding: utf-8

# In[1]:


n = int(input())

r_c = 1
r_r = 1

c_n = -n

for i in range(n * 2 + 1):
    c_n_r = c_n
    r_c = 1
    
    for j in range(n * 2 + 1):
        if c_n_r >= 0:
            print(c_n_r, end = "" if (r_c == -1 and c_n_r == 0) else " ")
        else:
            if r_c == 1:
                print(" ", end = " ")
            else:
                break 
        
        c_n_r += r_c
        
        if j == n - 1:
            r_c = -1
    
    if i == n:
        r_r = -1
    
    c_n += r_r
        
    print()


# In[2]:


n = int(input())

r_c = 1
r_r = 1

c_n = -n

for i in range(n * 2 + 1):
    c_n_r = c_n
    r_c = 1
    
    for j in range(n * 2 + 1):
        if c_n_r >= 0:
            print(c_n_r, end = "" if (r_c == -1 and c_n_r == 0) else " ")
        else:
            if r_c == 1:
                print(" ", end = " ")
            else:
                break 
        
        c_n_r += r_c
        
        if j == n - 1:
            r_c = -1
    
    if i == n:
        r_r = -1
    
    c_n += r_r
        
    print()


# In[ ]:




