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