using System;

namespace ConsoleApp26
{
    class Program
    {
        static void Main(string[] args)
        {
            string a, b, c;
            c = "";
            a = Console.ReadLine();
            b = Console.ReadLine();
            while (a!="" && b!="")
            {
                char a1 = a[a.Length - 1];
                char b1 = b[b.Length - 1];
                if(Convert.ToInt16(a1)>Convert.ToInt16(b1))
                {
                    c = a1 + c;
                }
                else if(Convert.ToInt16(a1) == Convert.ToInt16(b1))
                {
                    c = a1 + (a1 + c);
                }
                else
                {
                    c = b1 + c;
                }
                a = a.Remove(a.Length - 1);
                b = b.Remove(b.Length - 1);
            }
            c = a + b + c;
            Console.WriteLine(c);
        }
    }
}