#include<stdio.h>
#include<iostream>
#include <cstring>


using namespace std;

int main(){


string a,b,c;
string s1,s2,s3,s4,s5,s6,m;
int p;
cin>>a;
cin>>b;
cin>>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;
m=s1;
if(m<s2)
    m=s2;
if(m<s3)
    m=s3;
if(m<s4)
    m=s4;
if(m<s5)
    m=s5;
if(m<s6)
    m=s6;
    cout<<m;

   return 0;



}