#include<iostream>
#include<algorithm>

using namespace std;

string a,b,c,s1,s2,s3,s4,s5,s6;

int main()
{
    cin>>a>>b>>c;
    s1=a+b+c;
    s2=a+c+b;
    s3=b+a+c;
    s4=b+c+a;
    s5=c+a+b;
    s6=c+b+a;
    cout<<max(max(max(s1,s2),s3),max(max(s4,s5),s6));
    return 0;
}