#include <iostream>
#include<cmath>
using namespace std;
long long stepen(long long a,long long b)
{
    long long rez=1;
    for(long long i=0;i<b;i++)
    {
        rez=rez*a;
    }
    return rez;
}
long long maks(long long a,long long b,long long c)
{
    long long rez = max(max(a,b),max(b,c));
    return rez;
}
using namespace std;
int main()
{
     long long br1,br2,br3;
    cin >> br1 >> br2 >> br3;
    long long pom1=br1,pom2=br2,pom3=br3;
    long long pom11,pom22,pom33;
    long long c1=0,c2=0,c3=0;
    	while (pom1 != 0)
	{
		pom1 = pom1 / 10;
		c1++;
	}
	while (pom2 != 0)
	{
		pom2 = pom2 / 10;
		c2++;
	}
	while (pom3 != 0)
	{
		pom3 = pom3 / 10;
		c3++;
	}
	long long uk=maks(c1,c2,c3);
	pom11=br1*stepen(10,uk-c1);
	pom22=br2*stepen(10,uk-c2);
	pom33=br3*stepen(10,uk-c3);
	long long naj=maks(pom11,pom22,pom33);
	if(pom11==naj && pom22!=naj && pom33!=naj)
    {
        cout <<br1;
        if(pom22>pom33)
        {
            cout<< br2<<br3;
        }
        else
        {
            if(pom33>pom22)
            {
                cout << br3<<br2;
            }
            else
            {
                cout << min(br3,br2);
                cout << max(br3,br2);
            }
        }
    }
    if(pom11!=naj && pom22==naj && pom33 != naj)
    {
        cout << br2;
         if(pom11>pom33)
        {
            cout<< br1<<br3;
        }
        else
        {
            if(pom33>pom11)
            {
                cout << br3<<br1;
            }
            else
            {
                cout << min(br3,br1);
                cout << max(br3,br1);
            }
        }

    }
    if(pom11!=naj && pom22 != naj && pom33 == naj)
    {
        cout << br3;
             if(pom11>pom22)
        {
            cout<< br1<<br2;
        }
        else
        {
            if(pom22>pom11)
            {
                cout << br2<<br1;
            }
            else
            {
                cout << min(br2,br1);
                cout << max(br2,br1);
            }
        }
    }
    if(pom11==pom22 && pom22==pom33)
    {
        long long x = min(min(br1,br2),min(br2,br3));
        cout << x;
        if(br1==x)
        {
            cout << min(br2,br3);
            cout << max(br2,br3);
        }
        else
        {
        if(br2==x)
        {
            cout << min (br1,br3);
            cout << max (br1,br3);
        }
        else
        {
            cout<< min(br1,br2);
            cout << max(br1,br2);
        }
        }
    }
    if(pom11==naj && pom22==naj && pom33 !=naj)
    {
        cout << min(br1,br2);
        cout << max(br1,br2);
        cout << br3;
    }
    if(pom11==naj && pom22!=naj && pom33 == naj)
    {
        cout << min(br1,br3);
        cout << max(br1,br3);
        cout << br2;
    }
    if(pom11!=naj && pom22==naj && pom33 == naj)
    {
        cout << min(br2,br3);
        cout << max(br2,br3);
        cout << br1;
        }



}