#include <iostream>
#include <string>
#include <list>

int main(void)
{
	std::string str[3];
	std::list<std::string> mog;
	
	std::cin >> str[0] >> str[1] >> str[2];
	mog.push_back(str[0] + str[1] + str[2]);
	mog.push_back(str[0] + str[2] + str[1]);
	mog.push_back(str[1] + str[0] + str[2]);
	mog.push_back(str[1] + str[2] + str[0]);
	mog.push_back(str[2] + str[0] + str[1]);
	mog.push_back(str[2] + str[1] + str[0]);
	mog.sort();
	mog.reverse();
	
	std::cout << *mog.begin() << std::endl;
	return 0;
}