#P34. [KBC002A] Sequence 2
[KBC002A] Sequence 2
Source
This problem is adapted from Long Long OJ. All rights reserved.
Description
You have sequences and the length of the -th sequence is .
You're going to operate on these sequences:
- If the length of the -th sequence is less than the of the sum of the lengths of all sequences, the -th sequence consists letters
A
. - Otherwise, the -th sequence consists letters
B
.
Print all the sequences after the operation.
Input
The first line consists of an integer .
Then lines follow. The -th line of them consists of an integer .
Output
Print all the sequences after the operation.
Samples
5
1
2
3
4
5
A
AA
BBB
BBBB
BBBBB