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

namespace _1___Sudar_brojeva
{
    class Program
    {
        static void Main()
        {
            string x = Console.ReadLine();
            string y = Console.ReadLine();
            string resenje = String.Empty;

            List<char> ListX = new List<char>();
            ListX.AddRange(x);
            int countX = ListX.Count;
            List<char> ListY = new List<char>();
            ListY.AddRange(y);
            int countY = ListY.Count;

            if (countX > countY)
            {
                ListY.Reverse();

                while (countX > countY)
                {
                    ListY.Add('x');
                    countY++;
                }

                ListY.Reverse();
            }
            else if (countY > countX)
            {
                ListX.Reverse();

                while (countY > countX)
                {
                    ListX.Add('x');
                    countX++;
                }

                ListX.Reverse();
            }

            for (int i = 0; i < countX; i++)
            {
                if (ListX[i] == 'x')
                    resenje += ListY[i];
                else if (ListY[i] == 'x')
                    resenje += ListX[i];
                else if (ListX[i] == ListY[i])
                {
                    resenje += ListX[i];
                    resenje += ListX[i];
                }
                else
                    resenje += (int)ListX[i] > (int)ListY[i] ? ListX[i] : ListY[i];
            }

            Console.WriteLine(resenje);
        }
    }
}