atcoder#CODEFESTIVAL2017QUALBF. Largest Smallest Cyclic Shift

Largest Smallest Cyclic Shift

Score : 16001600 points

Problem Statement

For a string SS, let f(S)f(S) be the lexicographically smallest cyclic shift of SS. For example, if S=S =babca, f(S)=f(S) =ababc because this is the smallest among all cyclic shifts (babca, abcab, bcaba, cabab, ababc).

You are given three integers X,YX, Y, and ZZ. You want to construct a string TT that consists of exactly XX as, exactly YY bs, and exactly ZZ cs. If there are multiple such strings, you want to choose one that maximizes f(T)f(T) lexicographically.

Compute the lexicographically largest possible value of f(T)f(T).

Constraints

  • 1X+Y+Z501 \leq X + Y + Z \leq 50
  • X,Y,ZX, Y, Z are non-negative integers.

Input

Input is given from Standard Input in the following format:

XX YY ZZ

Output

Print the answer.

2 2 0
abab

TT must consist of two as and two bs.

  • If T=T =aabb, f(T)=f(T) =aabb.
  • If T=T =abab, f(T)=f(T) =abab.
  • If T=T =abba, f(T)=f(T) =aabb.
  • If T=T =baab, f(T)=f(T) =aabb.
  • If T=T =baba, f(T)=f(T) =abab.
  • If T=T =bbaa, f(T)=f(T) =aabb.

Thus, the largest possible f(T)f(T) is abab.

1 1 1
acb