#include <bits/stdc++.h>
using namespace std;
string A,B,C,x1,x2,x3,x4,x5,x6,maksimum;
int main (){
    cin>>A>>B>>C;

    x1=A+B+C;
    x2=A+C+B;
    x3=B+A+C;
    x4=B+C+A;
    x5=C+B+A;
    x6=C+A+B;

    maksimum=max(x6,max(x5,max(x4,max(x3,max(x1,x2)))));

    cout<<maksimum<<endl;


return 0;
}