#include <iostream>

using namespace std;

int main()
{
string a,b,c,abc,acb,bac,bca,cab,cba,max1;
   cin>>a;
   cin>>b;
   cin>>c;
   abc=a+b+c;
   acb=a+c+b;
   bac=b+a+c;
   bca=b+c+a;
   cab=c+a+b;
   cba=c+b+a;
   max1=abc;
    if(acb>max1){max1=acb;}
    if(bac>max1){max1=bac;}
    if(bca>max1){max1=bca;}
    if(cab>max1){max1=cab;}
    if(cba>max1){max1=acb;}

cout<<max1;
}