Problem D
Halloween Loot

Author: Petey21, cc0
Alf and Beata were two kids who lived long ago, during the time before you could spend Halloween participating in programming competitions. As such, their lives were much more boring than the lives of kids today. How can you survive without programming competitions, you may ask yourself. The answer is easy: you go trick-or-treating!
Every year Alf and Beata went out in their neighbourhood to go trick-or-treating. When they trick-or-treat a house, they get some amount of candy of various sorts. Once the kids have filled up their big bag of candy, they go back home.
Since Alf and Beata are very nice siblings, they want to
split all their candy evenly. The siblings have
Input
The first line of the input contains a single integer
Output
Output a string containing
Sample Input 1 | Sample Output 1 |
---|---|
5 -2 -1 0 1 2 2 1 0 -1 -2 |
AAAAA |
Sample Input 2 | Sample Output 2 |
---|---|
5 2 1 0 1 2 2 1 0 1 2 |
AAABB |