#include <iostream>
#include <iostream>
using namespace std;
int main (){
    string a,b,c;
    cin>>a>>b>>c;
    string x1=a+b+c;
    string x2=a+c+b;
    string x3=b+a+c;
    string x4=b+c+a;
    string x5=c+b+a;
    string x6=c+a+b;
    string maxx=max(max(max(x1,x2),max(x3,x4)),max(x5,x6));
    cout <<maxx;

return 0;
}