#include <bits/stdc++.h>
using namespace std;
string a,b,c,s,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+b+a;
    s6=c+a+b;
    s=max(max(max(max(max(s1,s2),s3),s4),s5),s6);
    cout<<s<<endl;
return 0;
}