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

namespace ANadovezivanje
{
    class Program
    {
        static string maxBroj(string A, string B)//max od A i B
        {
            if (A.Length > B.Length) return A;
            if (A.Length < B.Length) return B;
            int n = A.Length; //iste duzine
            for (int i = 0; i < n; i++) 
            {
                if (A[i] > B[i]) return A;
                if (A[i] < B[i]) return B;
            }
            return A;//jednaki su
        }
        static void Main(string[] args)
        {
            string[] r = Console.ReadLine().Split();
            string a = r[0];
            string b = r[1];
            string c = r[2];
            string maxbr = "";
            string[] br = new string[6];
            br[0] += a + b + c;
            br[1] += a + c + b;
            br[2] += b + a + c;
            br[3] += b + c + a;
            br[4] += c + a + b;
            br[5] += c + b + a;
            for (int i = 0; i < 6; i++)
            {
                maxbr = maxBroj(maxbr, br[i]);
            }
            Console.WriteLine(maxbr);
        }
    }
}