using System;
using System.Text;

class Program
{
    static void Main()
    {
        string X = Console.ReadLine();
        string Y = Console.ReadLine();
        if(X.Length > Y.Length)
        {
            Y = Y.PadLeft(X.Length, '-');
        }
        else
        {
            X = X.PadLeft(Y.Length, '-');
        }
        string Z = "";
        while (X != "" && Y != "")
        {
            if (X[X.Length - 1] >= Y[Y.Length - 1])
            {
                Z = Z.Insert(0, X[X.Length - 1].ToString());
            }
            if (X[X.Length - 1] <= Y[Y.Length - 1])
            {
                Z = Z.Insert(0, Y[Y.Length - 1].ToString());
            }
            X = X.Remove(X.Length - 1);
            Y = Y.Remove(Y.Length - 1);
        }
        Console.WriteLine(Z);
        Console.ReadLine();
    }
}