n = int(input()) for i in range(n): for j in range(i, -1, -1): print(chr(65+n-j-1), end=" ") print()
5
E D E C D E B C D E A B C D E
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!