#include <bits/stdc++.h>

using namespace std;

int main(){
	
	string s1, s2, s3, s4, s5, s6, a, b, c, max;
	
	string m[6];
	
	cin>>a>>b>>c;
	
	s1=a+b+c;
	s2=a+c+b;
	s3=b+c+a;
	s4=b+a+c;
	s5=c+a+b;
	s6=c+b+a;
	
	m[0]=s1;
	m[1]=s2;
	m[2]=s3;
	m[3]=s4;
	m[4]=s5;
	m[5]=s6;
	
	max=m[0];
	
	for(int i=0; i<6; i++)
	{
		if(strcmp(max.c_str(), m[i].c_str())<0)
		max=m[i];
		
		
		
	}
	cout<<max;
}