#include <bits/stdc++.h>

using namespace std;

unsigned long long redosled(unsigned long long a , unsigned long long b)
{
    unsigned long long maks;
    int a1 , b1;
    int a2 = a % 10;
    int b2 = b % 10;
    while(maks != a && maks != b)
    {
        a1 = a % 10;
        b1 = b % 10;
        if(a == b)
            maks = a;
            break;
        if(a == 0)
        {
            if(a2 > b1)
                maks = a;
            else if(a2 < b1)
                maks = b;
            else
                maks = a;
            break;
        }
        if(b == 0)
        {
            if(b2 > a1)
                maks = b;
            else if(b2 < ba)
                maks = a;
            else
                maks = b;
            break;
        }

        if(a1 > b1)
            maks = a;
            break;
        else if(b1 > a1)
            maks = b;
            break;
        else
           {
               a = a / 10;
               b = b / 10;
           }

    }
    return maks;

}

unsigned long long okrenibroj(unsigned long long a)
{
    unsigned long long a1;
    int i = 0 , n;
    while(a != 0)
    {
        n = a % 10;
        a1 = a1 + n * pow(i,10);

        i++;
    }
    return a1;
}

int main()
{
    unsigned long long a , b , c;
    cin >> a >> b >> c;
    unsigned long long a1 = okrenibroj(a);
    unsigned long long b1 = okrenibroj(b);
    unsigned long long c1 = okrenibroj(c);
    unsigned maks1 = maks(a1,b1);
    unsigned maks2 = maks(a1,c1);
    unsigned maks3 = maks(b1,c1);
    if(maks1 == a1)
    {
        if(maks2 == a1)
            cout << a << okrenibroj(maks3) << okrenibroj(b1 + c1 - maks3) << endl;
        else if(maks2 == c1)
            cout << c << a << b << endl;
    }
    else if(maks1 == b1)
    {
        if(maks3 == b1)
            cout << b << okrenibroj(maks2) << okrenibroj(a1 + c1 - maks2) << endl;
        else if(maks3 == c1)
            cout << c << b << a << endl;
    }

    return 0;
}