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

typedef long long ll;
const ll MOD = 1e9+7;

string s[3];
int ind[3];
int main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    cin>>s[0]>>s[1]>>s[2];
    ind[0]=0;
    ind[1]=1;
    ind[2]=2;

    string ans=s[0]+s[1]+s[2];

    do{
        string t=s[ind[0]]+s[ind[1]]+s[ind[2]];
        if(t>ans)ans=t;

    }while(next_permutation(ind,ind+3));

    cout<<ans;
    return 0;
}