#include<bits/stdc++.h>
using namespace std;
string A,B,C,z[10];
int p;
int main() {
    cin>>A>>B>>C;
    z[1]=A+B+C;
    z[2]=A+C+B;
    z[3]=B+A+C;
    z[4]=B+C+A;
    z[5]=C+A+B;
    z[6]=C+B+A;
    for(int i=1;i<=6;i++) {
        if(z[i]>z[p])
            p=i;
    }
    cout<<z[p]<<endl;
}