#include <bits/stdc++.h>

using namespace std;



int main()
{
    string a, b, c;
    cin >> a >> b >> c;

    string resenje[7];
    resenje[1] = a + b + c;
    resenje[2] = a + c + b;
    resenje[3] = b + a + c;
    resenje[4] = b + c + a;
    resenje[5] = c + a + b;
    resenje[6] = c + b + a;

    string maxResenje = resenje[1];
    for(int i = 2; i <= 6; i++)
        if(resenje[i] > maxResenje)
            maxResenje = resenje[i];

    cout << maxResenje;

    return 0;
}