using System;
using System.Text;

class Program
{
    static void Main()
    {
        string X = Console.ReadLine();
        string Y = Console.ReadLine();
        var Z = new StringBuilder("");

        while (!string.IsNullOrEmpty(X) && (!string.IsNullOrEmpty(Y)))
        {
            if (X[X.Length - 1] > Y[Y.Length - 1])
            {
                Z.Insert(0, X[X.Length - 1]);
            }
            else if(X[X.Length - 1] < Y[Y.Length - 1])
            {
                Z.Insert(0, Y[Y.Length - 1]);
            }
            else
            {
                Z.Insert(0, X[X.Length - 1]);
                Z.Insert(0, Y[Y.Length - 1]);
            }
            X = X.Remove(X.Length - 1);
            Y = Y.Remove(Y.Length - 1);
        }
        if(X != "")
        {
            while(X != "") 
            {
                Z.Insert(0, X[X.Length - 1]);
                X = X.Remove(X.Length - 1);
            }
        }
        if(Y != "")
        {
            while(Y != "") 
            {
                Z.Insert(0, X[Y.Length - 1]);
                Y = Y.Remove(Y.Length - 1);
            }
        }
        Console.WriteLine(Z.ToString());
        Console.ReadKey();
    }
}