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

namespace NADOVEZIVANJE
{
    class Program
    {   static string veci(string s1, string s2)
        {
            for (int i = 0; i < s1.Length; i++)
            {
                if (s1[i] > s2[i]) return s1;
                if (s2[i] > s1[i]) return s2;
            }
            return s1;
        }
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int p = s.IndexOf(" ");
            string s1 = s.Substring(0, p);
            s = s.Substring(p+1);
            p = s.IndexOf(" ");
            string s2 = s.Substring(0, p);
            string s3 = s.Substring(p+1);
            string xt,x;
            xt = s1 + s2 + s3;
            x = xt;
            xt = s1 + s3 + s2;
            x = veci(x, xt);
            xt = s2 + s1 + s3;
            x = veci(x, xt);
            xt = s2 + s3 + s1;
            x = veci(x, xt);
            xt = s3 + s1 + s2;
            x = veci(x, xt);
            xt = s3 + s2 + s1;
            x = veci(x, xt);
            Console.WriteLine(x);
        }
    }
}