#include <iostream>
#include <string>
using namespace std;
int uporedi(string s1,string s2)
{
    int veci=0,n;
    int duz1=sizeof(s1)/sizeof(s1[0]),duz2=sizeof(s2)/sizeof(s2[0]);
    if(duz1<duz2)
        n=duz1;
    else
        n=duz2;
    for(int i=0;i<n;i++)
    {
        int x=s1[i]-'0';
        int y=s2[i]-'0';
        if(x>y)
            veci=1;
        else if(x<y)
            veci=2;
        if(veci!=0)
            break;
    }
    if(veci==0)
        veci=1;
    return veci;
}
int main()
{
    string x,y,z;
    cin >> x;
    cin >> y;
    cin >> z;
    if(uporedi(x,y)==1 && uporedi(x,z)==1)
    {
        if(uporedi(y,z)==1)
            cout << x << y << z;
        else
            cout << x << z << y;
    }
    else if(uporedi(y,z)==1)
    {
        if(uporedi(x,z)==1)
            cout << y << x << z;
        else
            cout << y << z << x;
    }
    else if(uporedi(x,y)==1)
        cout << z << x << y;
    else
        cout << z << y << x;
    return 0;
}