#include<algorithm>
#include<iostream>
using namespace std;
string A,B,C,k1,k2,k3,k4,k5,k6,MAX="1";
int main(){
cin>>A>>B>>C;
k1=A+B+C;
k2=A+C+B;
k3=B+A+C;
k4=B+C+A;
k5=C+A+B;
k6=C+B+A;
if(k1>MAX){
    MAX=k1;
}
if(k2>MAX){
    MAX=k2;
}
if(k3>MAX){
    MAX=k3;
}
if(k4>MAX){
    MAX=k4;
}
if(k5>MAX){
    MAX=k5;
}
if(k6>MAX){
    MAX=k6;
}
cout<<MAX<<endl;
 return 0;
}