#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
string A,B,C,ABC[7],rez;
int main() {
	cin>>A>>B>>C;
	
	ABC[1]=A;
	ABC[1].append(B);
	ABC[1].append(C);
	
	ABC[2]=A;
	ABC[2].append(C);
	ABC[2].append(B);
	
	ABC[3]=B;
	ABC[3].append(A);
	ABC[3].append(C);
	
	ABC[4]=B;
	ABC[4].append(C);
	ABC[4].append(A);
	
	ABC[5]=C;
	ABC[5].append(A);
	ABC[5].append(B);
	
	ABC[6]=C;
	ABC[6].append(B);
	ABC[6].append(A);
	
	rez=ABC[1];
	
	for(int x=2;x<=6;x++){
	    if(ABC[x]>rez)rez=ABC[x];
	}
	cout<<rez<<endl;
	return 0;
}