#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    vector<string> sp;
    string s[3];
    cin >> s[0] >> s[1] >> s[2];
    sort(s, s+3);

    do
    {
        string s1 = s[0] + s[1] + s[2];

        sp.push_back(s1);
    } while(next_permutation(s, s+3));

    sort(sp.begin(), sp.end());

    cout << sp[sp.size()-1];
}