using System;
using System.Collections.Generic;
using System.Linq;

namespace _.krug_1.zadatak
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string br1 = Console.ReadLine();
            string br2 = Console.ReadLine();

            string veci, manji;
            if(br1.Length > br2.Length)
            {
                veci = br1;
                manji = br2;
            }
            else
            {
                veci = br2;
                manji = br1;
            }
            while (veci.Length > manji.Length)
            {
                Console.Write(veci.First());

                veci = veci.Remove(0,1);
            }
            while(veci.Length > 0)
            {
                if(veci.First() > manji.First())
                    Console.Write(veci.First());
                else if(manji.First() > veci.First())
                    Console.Write(manji.First());
                else
                    Console.Write(veci.First() + "" + manji.First());

                veci = veci.Remove(0, 1);
                manji = manji.Remove(0, 1);
            }
        }
    }
}