#include <iostream>


using namespace std;

string mx(string a,string b){
if (a>b) return a;
else return b;
}

int pw(int b){
    int c=10,i;
for (i=1;i<b;i++)c*=10;
return c;
}

      int main()
{
    string A,B,C,n1,n2,n3,n4,n5,n6;
    cin>>A>>B>>C;
    n1=A+B+C;
    n2=A+C+B;
    n3=B+A+C;
    n4=B+C+A;
    n5=C+B+A;
    n6=C+A+B;

    cout<<mx(mx(n1,n2),mx(mx(n3,n4),mx(n5,n6)));



    return 0;
}