A BBB CCCCC DDDDDDD EEEEEEEEE
n=int(input("Enter the limit"))
for i in range(1,n+1): #to count the lines
for space in range(1,n-i+1):
print(" ",end=" ")
for j in range(1,i+1):
print(chr(i+64),end=" ") #used two j statements to print the first and
for j in range(i-1,0,-1): #second half of the pattern
print(chr(i+64),end=" ")
print("\n")