#include<iostream>
#include<string>
using namespace std;
int main()
{
    string a,b,c;
    string d,a1,a2,maks,mini,sred;
    cin>>a>>b>>c;
    if ((a>=b)&&(a>=c))
        maks=a;
    else if ((b>=a)&&(b>=c))
        maks=b;
    else
        maks=c;
    if ((a<=b)&&(a<=c))
        mini=a;
    else if ((b<=a)&&(b<=c))
        mini=b;
    else
        mini=c;
    if ((maks>=a)&&(a>=mini))
        sred=a;
    else if ((maks>=b)&&(b>=mini))
        sred=b;
    else
        sred=c;
    cout<<maks+sred+mini<<endl;
}