#include <bits/stdc++.h>

using namespace std;
int main()
{
string A,B,C;
int AbigB,AbigC,BbigC;
cin >> A >> B >> C;

int n = A.length();
char a[n+1];
strcpy(a, A.c_str());
int n1 = B.length();
char b[n1+1];
strcpy(b, B.c_str());
int n2 = C.length();
char c[n2+1];
strcpy(c, C.c_str());

AbigB = strcmp(a,b);
AbigC = strcmp(a,c);
BbigC = strcmp(b,c);
if(AbigB > 0 ) AbigB = 1; else AbigB = 0;
if(AbigC > 0 ) AbigC = 1; else AbigC = 0;
if(BbigC > 0 ) BbigC = 1; else BbigC = 0;
     if(AbigB && AbigC && BbigC)   cout << A + B + C;
else if(AbigB && AbigC && !BbigC)  cout << A + C + B;
else if(!AbigB && AbigC && BbigC)  cout << B + A + C;
else if(!AbigB && !AbigC && BbigC) cout << B + C + A;
else if(AbigB && !AbigC && !BbigC) cout << C + A + B;
else if(!AbigB && !AbigC && !BbigC)cout << C + B + A;
else cout << A + B + C;



return(0);
}