#include <iostream>
#include <string>

using namespace std;

string connect(string a, string b, string c)
{
    return a + b + c;
}

int main()
{
    string nums[3];
    string possibilities[6];

    cin >> nums[0];
    cin >> nums[1];
    cin >> nums[2];

    possibilities[0] = connect(nums[0], nums[1], nums[2]);
    possibilities[1] = connect(nums[0], nums[2], nums[1]);
    possibilities[2] = connect(nums[1], nums[2], nums[0]);
    possibilities[3] = connect(nums[1], nums[0], nums[2]);
    possibilities[4] = connect(nums[2], nums[0], nums[1]);
    possibilities[5] = connect(nums[2], nums[1], nums[0]);

    string maxNum = "0";

    for (int i = 0; i < 6; ++i)
    {
        string targetedNum = possibilities[i];
        if (maxNum == "0")
        {
            maxNum = targetedNum;
        }
        else
        {
            for (int j = 0; j < targetedNum.length(); ++j)
            {
                string digitFirst (1, maxNum.at(j));
                string digitSecond (1, targetedNum.at(j));\
                if ( stoi(digitSecond) > stoi(digitFirst) )
                {
                    maxNum = targetedNum;
                    break;
                }
                else if ( stoi(digitFirst) > stoi(digitSecond))
                {
                    break;
                }
            }
        }
    }

    cout << maxNum << endl;

    return 0;
}