#include <iostream>
#include <string>

using namespace std;

int main()
{
    string a,b,c;
    cin>>a>>b>>c; // 15 9 12
    string niz[6];
    string broj;
    niz[0]=a+b+c; //15912
    niz[1]=a+c+b; //15129
    niz[2]=b+a+c; //91512
    niz[3]=b+c+a; //91215
    niz[4]=c+a+b; //12159
    niz[5]=c+b+a; //12915
    string max;
    max=niz[0];
    for(int i = 1; i < 6; i++)
    {
        broj=niz[i];
        for(int m = 0; m < niz[i].length(); m++)
        {
            if ((broj[m] - '0') > (max[m] - '0'))
            {
                max=broj;
                break;
            }
            else if ((broj[m] - '0') < (max[m] - '0'))
            {
                break;
            }
        }
    }

    cout<<max;

    return 0;
}