#include<bits/stdc++.h>
using namespace std;
string a,b,c,zbir;
int main()
{
    cin>>a>>b>>c;
    zbir=a+b+c;
    if(a+c+b>zbir){zbir=b+a+c;}
    if(b+a+c>zbir){zbir=b+a+c;}
    if(b+c+a>zbir){zbir=b+c+a;}
    if(c+a+b>zbir){zbir=c+a+b;}
    if(c+b+a>zbir){zbir=c+b+a;}
    cout<<zbir<<endl;
    return 0;
}