#include <bits/stdc++.h>

using namespace std;

string s1,s2,s3;
string x,y,z;
string w,q,r;
int main () {
    cin>>s1>>s2>>s3;
    x=s1+s2+s3;
    y=s1+s3+s2;
    z=s3+s2+s1;
    w=s3+s1+s2;
    q=s2+s1+s3;
    r=s2+s3+s1;
    cout<<max(max(max(max(max(r,q),w),y),z),x);
    return 0;
}