#include <bits/stdc++.h>
using namespace std;

int main()
{
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    string a,b,c,s1,s2,s3,s4,s5,s6,mx;
    cin >> a >> b >> c;
    s1=a+b+c;
    s2=a+c+b;
    s3=b+a+c;
    s4=b+c+a;
    s5=c+a+b;
    s6=c+b+a;
    mx=s1;
    if(s2>mx)
        mx=s2;
    if(s3>mx)
        mx=s3;
    if(s4>mx)
        mx=s4;
    if(s5>mx)
        mx=s5;
    if(s6>mx)
        mx=s6;
    cout << mx;
}