#include <bits/stdc++.h>

using namespace std;

#define int ll
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<pi> vp;
typedef vector<pl> vpl;

vi f(int a){
	vi sol;
	while(a){
		sol.push_back(a % 10);
		a /= 10;
	}
	reverse(sol.begin(), sol.end());
	return sol;
}

vi mix(vi a, vi b, vi c){
	vi sol = a;
	for (auto& i : b)
		sol.push_back(i);
	for (auto& i : c)
		sol.push_back(i);
	return sol;
}

signed main()
{
	ios_base::sync_with_stdio(false); 
	cin.tie(nullptr); 
	cout.tie(nullptr); 
	cerr.tie(nullptr);	

	int x, y, z;
	cin >> x >> y >> z;

	vi a = f(x), b = f(y), c = f(z);

	vi res1 = mix(a, b, c);
	vi res2 = mix(a, c, b);
	vi res3 = mix(b, a, c);
	vi res4 = mix(b, c, a);
	vi res5 = mix(c, b, a);
	vi res6 = mix(c, a, b);

	vi sol = res1;
	sol = max(sol, res2);
	sol = max(sol, res3);
	sol = max(sol, res4);
	sol = max(sol, res5);
	sol = max(sol, res6);

	for (auto& i : sol)
		cout << i;
	cout << '\n';
}