#반복제어문3 - 자가진단1
n=int(input())
su=0
i=1
while True:
su+=i
if su>=n:
print("%d %d %d" %(i, i//2+1, su))
break
i+=2
#반복제어문3 - 자가진단3
n=int(input())
for i in range(1, n+1):
for j in range(n-i+1, 0, -1):
print("*",end="")
print(" ")
for i in range(1, n+1):
for j in range(1, i+1):
print("*",end="")
print(" ")
#반복제어문3 - 자가진단2
n=int(input())
for i in range(1, n+1):
for j in range(1, i+1):
print("*",end="")
print(" ")
#554 : 반복제어문3 - 자가진단7
n=int(input())
ai="A"
k=1
for i in range(1, n+1):
for _ in range(n-i+1):
print(k, end=" ")
k+=1
for _ in range(i):
print(ai, end=" ")
ai=chr(ord(ai)+1)
print("")
#143 : 반복제어문3 - 형성평가4
n=int(input())
for i in range(n*2-1, -1, -2):
for j in range((n*2-1-i)//2):
print(" ",end="")
for k in range(i):
print("*",end="")
print("")
for i in range(3, n*2+1, 2):
for j in range((n-i+2)//2):
print(" ",end="")
for k in range(i):
print("*",end="")
print("")
#141 : 반복제어문3 - 형성평가2
n=int(input())
for i in range(1, 101):
if((n*i)%10==0):
print(n*i, end=" ")
break
else:
print(n*i, end=" ")
#142 : 반복제어문3 - 형성평가3
n=int(input())
for i in range(1, n+1):
for _ in range(i):
print("*",end="")
print("")
for i in range(1, n):
for _ in range(n-i):
print("*",end="")
print("")
#140 : 반복제어문3 - 형성평가1
n=list(map(int,input().split()))
sum1=0
ti=0
for i in n:
if(i==0):
break
if(ti==20):
break
else:
sum1+=i
ti+=1
print("%d %d" %(sum1, sum1//ti))
#140 : 반복제어문3 - 형성평가1
n=list(map(int,input().split()))
sum1=0
#ti=0
for ti, i in enumerate(n):
print(ti, i)
if(i==0):
break
if(ti==20):
break
else:
sum1+=i
#ti+=1
print("%d %d" %(sum1, sum1//ti))
#553 : 반복제어문3 - 자가진단6
n=int(input())
al="A"
for i in range(n):
for j in range(n-i,0,-1):
print(al,end="")
al=chr(ord(al)+1)
print(" ")
#반복제어문3 - 자가진단4
n=int(input())
for i in range(1, n+1):
for k in range(0, i-1):
print(" ",end="")
for j in range(n-i+1, 0, -1):
print("*",end="")
print(" ")