#include <bits/stdc++.h>
#include <string>
#include <cstring>

using namespace std;

int main()
{
    string a,b,c;
    cin>>a>>b>>c;
    string d=a+b+c;
    string e=a+c+b;
    if(e>d)
        d=e;
    e=b+a+c;
    if(e>d)
        d=e;
    e=b+c+a;
    if(e>d)
        d=e;
    e=c+a+b;
    if(e>d)
        d=e;
    e=c+b+a;
    if(e>d)
        d=e;
    cout << d << endl;
    return 0;
}