using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zadatak1Krug2
{
    class Program
    {
        static void Main(string[] args)
        {
            string abc = Console.ReadLine();
            string[] pom = abc.Split(' ');
            string a = pom[0];
            string b = pom[1];
            string c = pom[2];
            if (veci(a, b) == 1) {
                if (veci(b, c) == 1)
                    Console.WriteLine("{0}", a + b + c);
                else if (veci(c, a) == 1)
                    Console.WriteLine("{0}", c + a + b);
                else
                    Console.WriteLine("{0}", a + c + b);
            }
            else
            {
                if (veci(b, c) == 1)
                    if (veci(c, a) == 1)
                        Console.WriteLine("{0}", b + c + a);
                    else
                        Console.WriteLine("{0}", b + a + c);
                else
                    Console.WriteLine("{0}", c + b + a);
            }
        }
        static int veci(string x, string y)
        {
            int i = 0;
            while (Convert.ToInt64(x.Substring(i, 1)) == Convert.ToInt64(x.Substring(i, 1)))
            {
                i++;
            }
            if (Convert.ToInt64(x.Substring(i, 1)) >= Convert.ToInt64(y.Substring(i, 1)))
                return 1;
            else
                return 0;
        }
    }
}