def printstar(n ):
for i in range(1,n+1,2):
print ((' ' +'*'*i).center(10))
if i == n:
for x in range(1,i+1,2):
print ((' '+'*'*(n-x-1)).center(10))
printstar(9)
def printstar(n ):
for i in range(1,n+1,2):
print ((' ' +'*'*i).center(10))
if i == n:
for x in range(1,i+1,2):
print ((' '+'*'*(n-x-1)).center(10))
printstar(9)