#include <bits/stdc++.h>
#include <iostream>
using namespace std;

main(){
	string max, a1, b1, c1;
	cin	>> a1 >> b1 >>c1;
	max=a1+b1+c1;
	if (max<a1+c1+b1)
		max=a1+c1+b1;
	if (max<b1+a1+c1)
		max=b1+a1+c1;
	if (max<b1+c1+a1)
		max=b1+c1+a1;
	if (max<c1+a1+b1)
		max=c1+a1+b1;
	if (max<c1+b1+a1)
		max=c1+b1+a1;
	cout << max;
}