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

namespace Nadovezivanje
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] ulaz = new string[3];
            ulaz = Console.ReadLine().Split(' ');
            Console.WriteLine(Sort(ulaz));            
        }

        static string Sort(string[] ulaz)
        {
            string a = ulaz[0];
            string b = ulaz[1];
            string c = ulaz[2];
            string[] sorted = new string[3];
            if (IsBigger(a, b))
            {
                if (IsBigger(a, c))
                {
                    sorted[0] = a;
                    if (IsBigger(b, c))
                    {
                        sorted[1] = b;
                        sorted[2] = c;
                    }
                    else
                    {
                        sorted[1] = c;
                        sorted[2] = b;
                    }
                }
                else
                {
                    sorted[0] = c;
                    sorted[1] = a;
                    sorted[2] = b;
                }
            }
            else
            {
                if (IsBigger(b, c))
                {
                    sorted[0] = b;
                    if (IsBigger(a, c))
                    {
                        sorted[1] = a;
                        sorted[2] = c;
                    }
                    else
                    {
                        sorted[1] = c;
                        sorted[2] = a;
                    }
                }
                else
                {
                    sorted[0] = c;
                    sorted[1] = b;
                    sorted[2] = a;
                }
            }
            return sorted[0] + sorted[1] + sorted[2];
        }
        
        static bool IsBigger(String a, String b)
        {
            int index = 0;
            if (a.Length > b.Length)
            {                
                for (int i = 0; i < a.Length; ++i)
                {
                    int a1 = int.Parse(a.Substring(i, 1));
                    int b1 = int.Parse(b.Substring(index++, 1));
                    if (a1 > b1) return true;
                    if (b1 > a1) return false;
                    if (index == b.Length) index = 0;
                }
            }
            else
            {
                for (int i = 0; i < b.Length; ++i)
                {
                    int a1 = int.Parse(a.Substring(index++, 1));
                    int b1 = int.Parse(b.Substring(i, 1));
                    if (a1 > b1) return true;
                    if (b1 > a1) return false;
                    if (index == a.Length) index = 0;
                }
            }            
            return false;
        }
    }
}