#include <bits/stdc++.h>

using namespace std;

string a, b, c;

int main()
{
    cin >> a >> b >> c;
    cout << max(a + b + c, max(a + c + b, max(b + a + c, max(b + c + a, max(c + a + b, c + b + a)))));
    return 0;
}