#include <iostream>
#include <string>

using namespace std;

int main()
{
    string a, b, c, tmp, sab, sba, sac, sca, scb, sbc;
    cin>>a>>b>>c;
    sab=a+b;
    sba=b+a;
    if(sba.compare(sab)>0){tmp=b;b=a;a=tmp;}
    sbc=b+c;
    scb=c+b;
    if(scb.compare(sbc)>0)
        {tmp=c;c=b;b=tmp;
         sab=a+b;
         sba=b+a;
         if(sba.compare(sab)>0){tmp=b;b=a;a=tmp;}
    }
    cout<<a<<b<<c;

    return 0;
}