#include <iostream>

using namespace std;

int main()
{
    string a,b,c;
    cin >> a >> b >> c;
    string comb1 = a+b+c;
    string comb2 = a+c+b;
    string comb3 = b+a+c;
    string comb4 = b+c+a;
    string comb5 = c+a+b;
    string comb6 = c+b+a;
    string ans = max(comb1,max(comb2,max(comb3,max(comb4,max(comb5,comb6)))));
    cout << ans;
}