#GYM104678H. Make a wish!
Make a wish!
Description
If the person to your right and the person to your left have the same name, then you can make a wish. Your task is to arrange $n$ Andrews, $n$ Bens and $n$ Charlies in a row so that there are exactly $k$ people among them who can make a wish.
The input contains two numbers $n$ and $k$, $(1 \leq n \leq 20000$, $0 \leq k \leq 3*n)$.
If the necessary arrangement is impossible, print -1. Otherwise, output a string of $3*n$ characters. It must contain exactly $n$ characters $A$, $B$, $C$, each of which represents a person with the corresponding name. If there are more than one correct answers, print any of them.
Input
The input contains two numbers $n$ and $k$, $(1 \leq n \leq 20000$, $0 \leq k \leq 3*n)$.
Output
If the necessary arrangement is impossible, print -1. Otherwise, output a string of $3*n$ characters. It must contain exactly $n$ characters $A$, $B$, $C$, each of which represents a person with the corresponding name. If there are more than one correct answers, print any of them.
2 1
6 17
CAABCB
-1