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

namespace Petlja_Takmicenje
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string x = Console.ReadLine();
            string y = Console.ReadLine();
            string rez = "";
            int n;

            if (x.Length > y.Length)
            {
                n = x.Length;
            }
            else if (y.Length > x.Length)
            {
                n = y.Length;
            }
            else
            {
                n = x.Length;
            }

            for (int i = 0; i < n; i++)
            {
                if (i < x.Length && i < y.Length)
                {
                    if ((x[x.Length - 1 - i]) > (y[y.Length - 1 - i]))
                    {
                        rez += (x[x.Length - 1 - i]);
                    }
                    else if (y[y.Length - 1 - i] > (x[x.Length - 1 - i]))
                    {
                        rez += y[y.Length - 1 - i];
                    }
                    else
                    {
                        rez += y[y.Length - 1 - i];
                        rez += x[x.Length - 1 - i];
                    }
                }
                else
                {
                    if (i < x.Length)
                    {
                        rez += x[x.Length - 1 - i];
                    }
                    else
                    {
                        rez += y[y.Length - 1 - i];
                    }
                }


            }
            for (int i = 0; i < rez.Length; i++)
            {
                Console.Write(rez[rez.Length - 1 - i]);
            }

            Console.ReadLine();
        }
    }
}