#include <iostream>
#include <cmath>
using namespace std;
string a,b,c,b1,b2,b3,b4,b5,b6;
int main () {
cin>>a>>b>>c;
b1=a+b+c;
b2=a+c+b;
b3=b+a+c;
b4=b+c+a;
b5=c+a+b;
b6=c+b+a;
cout<<max(max(max(b1,b2),max(b3,b4)),max(b5,b6))<<endl;
return 0;
}