#include <iostream>
#include <string>
using namespace std;
int main() {
	string a,b,c,x1,x2,x3,x4,x5,x6,x;
	cin>>a>>b>>c;

x1=a+b+c;
x2=a+c+b;
x3=b+a+c;
x4=b+c+a;
x5=c+a+b;
x6=c+b+a;
x=max(x1,max(x2,max(x3,max(x4,max(x5,x6)))));
cout<<x;


return 0;
}