#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

int uporedi(string x, string y) {
	string ab = x.append(y);

	string ba = y.append(x);

	return ab.compare(ba) > 0 ? 1 : 0;
}

void stampaj(vector<string> a) {
	sort(a.begin(), a.end(), uporedi);

	for (int i = 0; i < a.size(); i++) {
		cout << a[i];
	}
}

int main() {
	string x;
	vector<string> a;
	for (int i = 0; i < 3; i++) {
		cin >> x;
		a.push_back(x);
	}
	stampaj(a);
	return 0;
}