#include <bits/stdc++.h>

using namespace std;

int main()
{
    string x, a, b, c, p;
    int n = 0, m = 0, i;
    char space = ' ';

    getline(cin, x);

    for(i = 0; i < x.length(); i ++)
    {
        if(space == x[i])
        {
            if(!n)
                n = i;
            else
                m = i;
        }
    }

    a = x.substr(0, n);
    b = x.substr(n + 1, m - n - 1);
    c = x.substr(m + 1);

    if(a.compare(b) > 0)
    {
        if(a.compare(c) > 0)
        {
            x = a;
            if(b.compare(c) > 0)
                x += b + c;
            else
                x += c + b;
        }
        else
        {
            x = c;
            x += a + b;
        }
    }
    else
    {
        if(b.compare(c) > 0)
        {
            x = b;
            if(a.compare(c) > 0)
                x += a + c;
            else
                x += c + a;
        }
        else
        {
            x = c;
            x += b + a;
        }
    }

    cout << x;

    return 0;
}