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

using namespace std;

bool greaterThan(string s1, string s2) {
    auto minL = min(s1.length(), s2.length());
    
    for (int i = 0; i < minL; i++)
        if (s1[i] != s2[i])
            return s1[i] > s2[i];
    
    return s1.length() > s2.length();
}

int main() {
    vector<string> v(3);
    
    for (auto &i : v) cin >> i;
    
    sort(v.begin(), v.end(), greaterThan);
    
    for (auto &i : v) cout << i;
}