#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

int main()
{
	std::vector<std::string> br(3);
	for (int i = 0; i < 3; i++) std::cin >> br[i];
	std::sort(br.begin(), br.end());
	std::string MAX = "", s;
	do
	{
		s = "";
		for (int i = 0; i < 3; i++) s += br[i];
		MAX = std::max(MAX, s);
	} while (std::next_permutation(br.begin(), br.end()));
	std::cout << MAX;
	return 0;
}