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

namespace Nadovezivanje
{
    class Program
    {
        static void funkcija(string[]niz, ref string[]mogucnosti)
        {
            mogucnosti[0] = niz[0] + niz[1] + niz[2];
            mogucnosti[1] = niz[0] + niz[2] + niz[1];
            mogucnosti[2] = niz[1] + niz[0] + niz[2];
            mogucnosti[3] = niz[1] + niz[2] + niz[0];
            mogucnosti[4] = niz[2] + niz[0] + niz[1];
            mogucnosti[5] = niz[2] + niz[1] + niz[0];
        }
        
        static void f3(string[]n,ref string max)
        {
            StringComparer comparer = StringComparer.OrdinalIgnoreCase;
            for (int i = 1; i < 6; i++)
                if (comparer.Compare(max, n[i]) < 0)
                    max = n[i];
        }
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] s2 = s.Split(' ');
            string a = s2[0];
            string b = s2[1];
            string c = s2[2];
            string[] niz = new string[3];
            niz[0] = a;
            niz[1] = b;
            niz[2] = c;
            string[] mogucnosti = new string[6];
            funkcija(niz, ref mogucnosti);
            string max = mogucnosti[0];
            f3(mogucnosti, ref max);
            Console.WriteLine(max);
        }
    }
}