#include<iostream>
#include<algorithm>


using namespace std;

typedef long long ll;

ll deset(ll x)
{
    ll i=1;
    while(i<=x)
    {
        i*=10;
    }
    return i;

}






int main()
{
    ll a,b,c;
    cin>>a>>b>>c;
    ll md=deset(a);
    if(md<deset(b))md=deset(b);
    if(md<deset(c))md=deset(c);
    ll A=a, B=b, C=c;
    ll pa=a,pb=b,pc=c;
    while(A<10*md)
    {
        A=A*10+(a%deset(a));
        a%=deset(a);

    }
    while(B<10*md)
    {
        B=B*10+(b%deset(b));
        a%=deset(a);

    }
    while(C<10*md)
    {
        C=C*10+(c%deset(c));
        c%=deset(c);

    }
    if(A>=B&&A>=C)
    {
        cout<<pa;
        if(B>=C)cout<<pb<<pc;
        else cout<<pc<<pb;
    }
    else if(B>=A&&B>=C)
    {
        cout<<pb;
        if(A>=C)cout<<pa<<pc;
        else cout<<pc<<pa;
    }
    else
    {
        cout<<pc;
        if(A>=B)cout<<pa<<pb;
        else cout<<pb<<pa;
    }

}