题目描述
Problem Description
For a string \( S \), let \( f(S) \) be the lexicographically smallest cyclic shift of \( S \). For example, when \( S = \) babca, the cyclic shifts (babca, abcab, bcaba, cabab, ababc) of \( S \) have ababc as the smallest, which is \( f(S) \).
You are given three integers \( X \), \( Y \), and \( Z \). You want to construct a string \( T \) that contains exactly \( X \) a's, \( Y \) b's, and \( Z \) c's. If there are multiple such strings, you want to maximize \( f(T) \) lexicographically.
Find the lexicographically largest value of \( f(T) \).
Input Format
The input is given from the standard input in the following format:
\( X \) \( Y \) \( Z \)
Output Format
Output the answer.
Sample Input and Output
Sample Input #1
2 2 0
Sample Output #1
abab
Sample Input #2
1 1 1
Sample Output #2
acb
Notes/Hints
Constraints
- \( 1 \leq X + Y + Z \leq 50 \)
- \( X \), \( Y \), \( Z \) are non-negative integers.
Sample Explanation 1
\( T \) must consist of two a's and two b's.
- When \( T = \) aabb, \( f(T) = \) aabb.
- When \( T = \) abab, \( f(T) = \) abab.
- When \( T = \) abba, \( f(T) = \) aabb.
- When \( T = \) baab, \( f(T) = \) aabb.
- When \( T = \) baba, \( f(T) = \) abab.
- When \( T = \) bbaa, \( f(T) = \) aabb.
Thus, the maximum value of \( f(T) \) is abab.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分