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

namespace kvalifikacije21
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] niz = Console.ReadLine().Split();
            string max = "";

            for (int i = 0; i < 3; i++)
                max += niz[i];
            
            for(int i=0;i<3;i++)
            {
                max = BiggerNum(max, niz[i] + niz[(i + 1) % 3] + niz[(i + 2) % 3], 0);
                max= BiggerNum(max, niz[i] + niz[(i + 2) % 3] + niz[(i + 1) % 3], 0);
            }
            Console.WriteLine(max);
        }

        static string BiggerNum(string a, string b, int i)
        {
            if (i == a.Length)
                return a;
            if (a[i] > b[i])
                return a;
            if (a[i] < b[i])
                return b;
            return BiggerNum(a, b, i + 1);
        }
    }
}