# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

#triangle of pattern
n=int(input())
i=1
while i<=n:
    spaces=1
    while spaces<=n-i:
        print(' ',end='')
        spaces+=1
    j=1
    p=i
    while j<=i:     
        print(p,end='')
        p+=1
        j+=1    
    p=i-1
    j = 0
    while p>=1:
        
        r=(2*i)-j-2
        print(r,end='')
        p-=1
        j += 1
    print()
    i+=1

n=int(input())
i=1
while(i<=n):
    j=n
    while(j>=i):
        print(" ",end="")
        j=j-1
    k=1
    while(k<=2*i-1):
        print("*",end="")
        k=k+1
    print(" ")
    i=i+1



StarcoderdataJupyterScriptsDedupFiltered