#include<cstdio>
#include<vector>
#include<string>
#include<algorithm>
#include<iostream>
#define pb push_back
using namespace std;
vector<string>rez;
string s[4];
bool ss(string a,string b){
   if(a.size()<b.size())return 1;
   if(a.size()>b.size())return 0;

   for(int i=0;i<a.size();i++){
      if(a[i]<b[i])return 1;
      if(a[i]>b[i])return 0;
   }
   return 0;
}
int main(){

    cin>>s[1]>>s[2]>>s[3];

    for(int i=1;i<=3;i++){
        for(int j=1;j<=3;j++){
           for(int k=1;k<=3;k++){
              if(i==k || i==j || j==k)continue;
              string pom;
              pom=s[i]+s[j]+s[k];

              rez.pb(pom);
           }
        }
    }

    sort(rez.begin(),rez.end(),ss);

    cout<<rez[rez.size()-1]<<endl;


return 0;
}