Page not loading? Try clicking here.
Placeholder

#1339

Character Triangle 2 1s 64MB

Problems

After receiving the height N of a triangle,
write a program that prints a triangle shape by filling characters starting from ‘A’
in order, beginning from the middle row on the right side as shown below.

<Processing Conditions>

(1) Place the character ‘A’ in the middle row on the right side,
 then move to the column on the left and fill from top to bottom.

(2) Repeat this process for each column until reaching the leftmost column.
 (After ‘Z’, start again from ‘A’.)


Input

Receive the height N of the triangle (1 \le N \le 100; N is an odd number).


Output

Print the character triangle of height N in the given format.
Separate the characters with one space.
If the input is out of range, print "INPUT ERROR".


Example

5
E

F B
G C A
H D
I


Source

JUNGOL

You must sign in to write code.