#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
string a,b,c,abc[15];
int main(){
cin>>a>>b>>c;
abc[1]=a+b+c;
abc[2]=a+c+b;
abc[3]=b+a+c;
abc[4]=b+c+a;
abc[5]=c+a+b;
abc[6]=c+b+a;
sort(abc+1,abc+1+6);
cout<<abc[6];
	return 0;
}