#include <iostream>
#include <cstring>
using namespace std;

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