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

namespace ConsoleApp2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            string c = "";
            int i = 0;
            int la = a.Length;
            int lb = b.Length;
            while (i < la && i < lb)
            {
                if(a[la - i - 1] == b[lb - i - 1])
                {
                    c =Convert.ToString(a[la - i - 1]) + b[lb - i - 1] + c;
                }
                else if (a[la - i - 1] > b[lb - i - 1])
                {
                    c = Convert.ToString(a[la - i - 1]) + c;
                }
                else
                {
                    c = Convert.ToString(b[lb - i - 1]) + c;
                }
                i++;
            }
            while (i < la)
            {
                c = Convert.ToString(a[la - i - 1]) + c;
                i++;
            }
            while (i < lb)
            {
                c = Convert.ToString(b[lb - i - 1]) + c;
                i++;
            }
            Console.WriteLine(c);
        }
    }
}