using System;
using System.Text;

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