#include<iostream>
#include<string>
using namespace std;
int main()
{
    string a,b,c,t1,t2,t3,t4,t5,t6,maks;
    cin>>a>>b>>c;
    t1=a+b+c;
    t2=a+c+b;
    t3=b+a+c;
    t4=b+c+a;
    t5=c+a+b;
    t6=c+b+a;
    maks=t1;
    if (t2>maks)
        maks=t2;
    if (t3>maks)
        maks=t3;
    if (t4>maks)
        maks=t4;
    if (t5>maks)
        maks=t5;
    if (t6>maks)
        maks=t6;
    cout<<maks<<endl;
}