#include <bits/stdc++.h>
using namespace std;
int main()
{
	string a, b, c, s, s1, s2, s3, s4, s5;
	cin >> a >> b>>c;
	s = a+b+c;
	s1 = a+c+b;
	s2 = b+c+a;
	s3 = b+a+c;
	s4=c+a+b;
	s5=c+b+a;
	if(s1 > s)
		s = s1;
	if(s2 > s)
		s=s2;
	if(s3 > s)
		s = s3;
	if(s4 > s)
		s=s4;
	if(s5 > s)
		s = s5;
	cout << s << endl;
	return 0;
}