#include <iostream>

using namespace std;

int main()
{
    string a1,b1,c1;
    cin >>a1>>b1>>c1;
    string x[6];
    for(int i = 0; i < 6; i++)
    {
        x[i] = "";
    }
    x[0] =a1+b1+c1;
    x[1] =a1+c1+b1;
    x[2] =b1+a1+c1;
    x[3] =b1+c1+a1;
    x[4] =c1+a1+b1;
    x[5] =c1+b1+a1;
    string maximum = "";
    for(int i = 0; i < 6; i++)
    {
        if(x[i] > maximum) maximum = x[i];
    }
    cout << maximum << endl;
    return 0;
}