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

namespace Kvalifikacije21
{
    class Program
    {
        static bool Poredi(string x,string y)
        {
            bool p = false;
            int i = 0;
            while(p==false&&i<x.Length)
            {
                if (y[i] > x[i])
                    p = true;
                if (y[i] < x[i])
                    i = x.Length;
                i++;
            }
            return p;
        }
        static void Main(string[] args)
        {
            var line = Console.ReadLine();
            var data = line.Split(' ');
            string a = data[0];
            string b = data[1];
            string c = data[2];

            string max = a + b + c;
            if (Poredi(max, a + c + b))
                max = a + c + b;
            if (Poredi(max, b + a + c))
                max = b + a + c;
            if (Poredi(max, b + c + a))
                max = b + c + a;
            if (Poredi(max, c + a + b))
                max = c + a + b;
            if (Poredi(max, c + b + a))
                max = c + b + a;
            Console.WriteLine(max);
        }
    }
}