for x in range(5,0,-1):
    for y in range(0,x):
        print(chr(y+65),end='')
    print()



"""
# p[attern 

ABCDE
ABCD
ABC
AB
A

"""
for x in range(5,0,-1):
    for y in range(0,x):
        print(chr(y+65),end='')
    print()



"""
# p[attern 

ABCDE
ABCD
ABC
AB
A

"""
# p[attern   ABCDE ABCD ABC AB A