There are two-letter strings, "AA", "AB" and "BB", which appear AA, AB and BB times respectively. The task is to join some of these strings to create the longest possible string which does not contain "AAA" or "BBB". For example, having AA = 5, AB = 0 and BB = 2, it is possible to join five strings by taking both of the "BB" strings and three of the "AA" strings. Then they can be joined into "AA-BB-AA-BB-AA" = "AABBAABBA". Note that it is not possible to add another "AA" string as the result would then contain "AAA".
Given three integers AA, AB and BB, returns the longest string that can be created according to the rules described above. If there is more than one possible answer, the function may return any of them.
Example 1:
Input: AA = 5, AB = 0, BB = 2
Output: "AABBAABBA"
Explanation:Given AA = 5, AB = 0 and BB = 2, the function should return "AABBAABBA", as explained above.
Example 2:
Input: AA = 1, AB = 2, BB = 1
Output: "BBAABAA"
Explanation:Given AA = 1, AB = 2 and BB = 1, possible results are "BBAABAA", "ABABAB", "ABAABAB" or "AABBAAB".
Example 3:
Input: AA = 0, AB = 2, BB = 0
Output: "ABAB"
Explanation:Given AA = 0, AB = 2 and BB = 0, the function should return "ABAB".
Example 4:
Input: AA = 0, AB = 0, BB = 10
Output: "BB"
Explanation:Given AA = 0, AB = 0 and BB = 10, the function should return "BB".
- AA, AB and BB are integers within the range [0..10].
- The resulting string will not be empty.

input:
output: