#include <iostream>

using namespace std;
void podeli(int x[],long long a,int &n)
{
    int i=0;
    while(a>0)
    {
        x[i]=a%10;
        a=a/10;
        i++;
    }
    n=i;
}
int mini(int a,int b,int c)
{
    if(a<b)
        if(a<c)
            return a;
        else
            return c;
    else
        if(b<c)
            return b;
        else
            return c;
}
void ispis(int a[],int n)
{
    int i;
    for(i=0;i<n;i++)
        cout<<a[i]<<" ";
}
long long napravi(int x[],int n,int m)
{
    long long p=0;
    for(int i=0;i<m;i++)
    {
        p=p+x[n-i-1];
        p=p*10;
    }
    p=p/10;
    return p;
}
int poredi(int x1[],int n1,int x2[],int n2,int m)
{
    int i;
    if(n1>n2)
        {
            for(i=n2-1-m;i>=0;i--)
                if(x2[i]>x1[i])
                    return 0;
                else
                    if(x2[i]<x1[i])
                        return 1;
            return 1;
        }
    else
        {
            for(i=n1-1-m;i>=0;i--)
                if(x2[i]>x1[i])
                    return 0;
                else
                    if(x2[i]<x1[i])
                        return 1;
            return 0;
        }
}

int main()
{
    long long a,b,c,p1,p2,p3;
    int n1,n2,n3,m;
    int x1[100],x2[100],x3[100];
    cin>>a>>b>>c;
    podeli(x1,a,n1);
    podeli(x2,b,n2);
    podeli(x3,c,n3);
    m=mini(n1,n2,n3);
    p1=napravi(x1,n1,m);
    p2=napravi(x2,n2,m);
    p3=napravi(x3,n3,m);
    if(p1>p2)
        if(p1>p3)
            if(p2>p3)
                cout<<a<<b<<c;
            else
                if(p2<p3)
                    cout<<a<<c<<b;
                else
                    if(poredi(x2,n2,x3,n3,m))
                        cout<<a<<b<<c;
                    else
                        cout<<a<<c<<b;
        else
            if(p3>p1)
                cout<<c<<a<<b;
            else
                if(poredi(x3,n3,x1,n1,m))
                    cout<<c<<a<<b;
                else
                    cout<<a<<b<<c;
    else
        if(p1<p3)
            if(p2<p3)
                cout<<c<<b<<a;
            else
                if(p2>p3)
                    cout<<b<<c<<a;
                else
                    if(poredi(x2,n2,x3,n3,m))
                        cout<<b<<c<<a;
                    else
                        cout<<c<<b<<a;
        else
            if(p1>p3)
                cout<<b<<a<<c;
            else
                if(poredi(x1,n1,x3,n3,m))
                    cout<<b<<a<<c;
                else
                    cout<<b<<c<<a;
    return 0;
}