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

bool veci(std::string a, std::string b) {
	if(a[0] == b[0]) {
		if(a.length() == b.length()) {
			bool reseno = false;
			for(int i = 1; i < a.length(); i++) {
				if(a[i] != b[i]) {
					return a[i] > b[i];
				}
			}
			if(!reseno) {
				return false;
			}
		}else{
			return a.length() > b.length();
		}
	}else{
		return a[0] > b[0];
	}
}

int main() {

	std::string line;

	getline(std::cin, line);

	std::vector<std::string> brojevi;

	brojevi.push_back(line.substr(0, line.find(" ")));
	line = line.substr(line.find(" ")+1);
	brojevi.push_back(line.substr(0, line.find(" ")));
	brojevi.push_back(line.substr(line.find(" ")+1));

	std::sort(brojevi.begin(), brojevi.end(), veci);

	std::cout << brojevi[0] << brojevi[1] << brojevi[2] << '\n';

	return 0;
}