#include <iostream>
#include <string>
using namespace std;

string maks(string s, string p)
{
    for(int i=0;i<s.length();i++)
    {
        if((s[i]-'0')<(p[i]-'0'))
                return p;
        else if(s[i]!=p[i])
            return s;
    }
    return s;
}
int main()
{
    string s,a,b,c,r1,r2,r3,r4,r5,r6;
    getline(cin,s);
    int ind = s.find(" ");
    a=s.substr(0,ind);
    s.erase(0,ind+1);
    ind = s.find(" ");
    b=s.substr(0,ind);
    s.erase(0,ind+1);
    c=s;
    r1 = a+b+c;
    r2 = a+c+b;
    r3 = b+a+c;
    r4 = b+c+a;
    r5 = c+a+b;
    r6 = c+b+a;
    //cout<<r1<<" "<<r2<<" "<<r3<<" "<<r4<<" "<<r5<<" "<<r6<<endl;
    cout<<maks(r1,maks(r2,maks(r3,maks(r4,maks(r5,r6)))));
    return 0;
}