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

namespace Zadatak1
{
    class Program
    {
        static string uporedi(string a, string b)
        {
            string x="";
            for (int i = 0; i < a.Length; i++)
            {
                if (a[i] > b[i]) x = x + a[i];
                else if (a[i] < b[i]) x = x + b[i];
                else x = x + Convert.ToString(a[i]) + Convert.ToString(b[i]);
            }
            return x;
        }

        static void Main(string[] args)
        {
            string x = Console.ReadLine();
            string y = Console.ReadLine();
            if (x.Length > y.Length)
                Console.WriteLine(x.Substring(0, x.Length - y.Length) + uporedi(x.Substring(x.Length-y.Length), y));
            else Console.WriteLine(y.Substring(0, y.Length - x.Length) + uporedi(x, y.Substring(y.Length-x.Length)));
            Console.ReadKey();

        }
        
    }
}