using System;

namespace Nadovezivanje
{
    class Program
    {
        static void Main(string[] args)
        {
            string tempstr = Console.ReadLine();
            string[] a = new string[2];
            a = tempstr.Split(" ");

            string temp = "0";
            for (int write = 0; write < a.Length; write++)
            {
                for (int sort = 0; sort < a.Length - 1; sort++)
                {
                    if (Convert.ToInt16(a[sort].Substring(0, 1)) <  Convert.ToInt16(a[sort + 1].Substring(0, 1)))
                    {
                        temp = a[sort + 1];
                        a[sort + 1] = a[sort];
                        a[sort] = temp;
                    }
                }
                for (int i = 0; i < a.Length; i++)
                    Console.Write(a[i]);
                Console.ReadKey();
            }

        }
    }
}