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

namespace SudarBrojeva
{
    class Program
    {
        static void Trimer (ref string a, ref string b, ref string pocetak)
        {
            if (a.Length > b.Length)
            {
                pocetak = a.Substring(0, a.Length - b.Length);
                a = a.Substring(a.Length - b.Length);       
            }
            else
            {
                pocetak = b.Substring(0, b.Length - a.Length);
                b = b.Substring(b.Length - a.Length);
            }
        }

        static string SudareniString(string a, string b, int n)
        {
            if (n == a.Length) return "";
            if (a[n] > b[n]) return a[n] + SudareniString(a, b, n + 1);
            if (a[n] < b[n]) return b[n] + SudareniString(a, b, n + 1);
            else return Convert.ToString(a[n]) + Convert.ToString(b[n]) + SudareniString(a, b, n + 1);
        }

        static void Main(string[] args)
        {
            string br1, br2, pocetak = "";

            br1 = Console.ReadLine();
            br2 = Console.ReadLine();

            if (br1.Length != br2.Length)
            {
                Trimer(ref br1, ref br2, ref pocetak);
            }

            Console.WriteLine(pocetak + SudareniString(br1, br2, 0));
        }
    }
}