#include <cstdio>
#include <iostream>
using namespace std;
bool veci(unsigned long long int a, unsigned long long int b)
{
	unsigned long long int d;
	while (a>0 && b>0)
	{
		if (a%10>b%10) return true;
		if (a%10<b%10) return false;
		a/=10;
		b/=10;
	}
	if (b==0) return true;
	return false;
}
unsigned long long int inv(unsigned long long int a)
{
	unsigned long long int a1=0;
	while (a!=0)
	{
		a1=a1*10+(a%10);
		a/=10;
	}
	return a1;
	
}
int main()
{
	unsigned long long int a,b,c,d,a1,b1,c1;
	cin >> a >> b >> c;
	a1=inv(a);b1=inv(b);c1=inv(c);
	if (veci(a1,b1) && veci(b1,c1)) cout << a << b << c ;
	else if (veci(a1,c1) && veci(c1,b1)) cout << a << c << b;
	else if (veci(b1,c1) && veci(c1,a1) ) cout << b << c << a;
	else if (veci(b1,a1) && veci(a1,c1)) cout << b << a << c;
	else if (veci(c1,a1) && veci(a1,b1)) cout << c << a << b;
	else if (veci(c1,b1) && veci(b1,a1)) cout << c << b << a;
	return 0;
}