#include <iostream>
#include <math.h>
#include <string>

using namespace std;

bool compare(string x,string y)
{
bool a;
if(x>=y)
    a=true;
else
    a=false;
return a;
}
int main()
{
    string A,B,C,F,S,T,N1,N2,N3,N4,N5,N6;
    string big1,big2,big3,BIG,biggest;
    cin >> A >> B >> C;

    N1=A+B+C;
    N2=A+C+B;
    N3=B+A+C;
    N4=B+C+A;
    N5=C+A+B;
    N6=C+B+A;

    if(compare(N1,N2)==true)
        big1=N1;
    else
        big1=N2;
    if(compare(N3,N4)==true)
        big2=N3;
    else
        big2=N4;
    if(compare(N5,N6)==true)
        big3=N5;
    else
        big3=N6;
    if(compare(big1,big2)==true)
        BIG=big1;
    else
        BIG=big2;
    if(compare(BIG,big3)==true)
        biggest=BIG;
    else
        biggest=big3;
    cout << biggest << endl;
    return 0;
}