Problem:
Score : 1600 points

Problem Statement

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

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

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

Constraints

1 \leq X + Y + Z \leq 50

X, Y, Z are non-negative integers.

Input

Input is given from Standard Input in the following format:

X Y Z

Output

Print the answer.

Sample Input 1

2 2 0

Sample Output 1

abab

T must consist of two as and two bs.

If T = aabb, f(T) = aabb.

If T = abab, f(T) = abab.

If T = abba, f(T) = aabb.

If T = baab, f(T) = aabb.

If T = baba, f(T) = abab.

If T = bbaa, f(T) = aabb.

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

Sample Input 2

1 1 1

Sample Output 2

acb

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

// ayy
// ' lamo
#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld; //CARE
typedef complex<ld> pt;
#define fi first
#define se second
#define pb push_back
const ld eps=1e-8;
const int inf=1e9+99;
const ll linf=1e18+99;
const int P=1e9+7;




string g1(string A,int X) {
	string Z="";
	// cerr<<A<<" * "<<X<<endl;
	for(;X--;) Z+=A;
	return Z;
}

string g2(string A,string B,int X,int Y) {
	// cerr<<"g2"<<" "<<A<<" "<<B<<" "<<X<<" "<<Y<<endl;
	assert(A<B);
	if(!X) return g1(B,Y);
	if(!Y) return g1(A,X);
	string AA=A;
	string BB=A;
	for(int i=1;i*X<=Y;i++) AA+=B, BB+=B;
	AA+=B;
	int XX=Y%X;
	int YY=X-XX;
	return g2(BB,AA,YY,XX);
}




string g3(string A,string B,string C,int X,int Y,int Z) {
	// cerr<<"g3"<<" "<<A<<" "<<B<<" "<<C<<" "<<X<<" "<<Y<<" "<<Z<<endl;
	assert(A<B && B<C);
	if(!X) return g2(B,C,Y,Z);
	if(!Y) return g2(A,C,X,Z);
	if(!Z) return g2(A,B,X,Y);
	string AA=A;
	string BB=A;
	string CC=A;
	for(int i=1;i*X<=Z;i++) AA+=C, BB+=C, CC+=C;
	AA+=C;
	int XX=Z%X;
	int qq=X-XX;
	assert(qq>=1);
	for(int i=1;i*qq<=Y;i++) BB+=B, CC+=B;
	BB+=B;
	int YY=Y%qq;
	int ZZ=qq-YY;
	assert(XX+YY+ZZ == X);
	return g3(CC,BB,AA,ZZ,YY,XX);
}


int32_t main() {
	int X,Y,Z;
	cin>>X>>Y>>Z;
	cout<<g3("a","b","c",X,Y,Z)<<endl;
}