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.Insert(0, "-");
            }
        }
        else
        {
            while(X.Length != Y.Length) 
            {
                X = X.Insert(0, "-");
            }
        }
        string Z = "";
        while (X != "" && Y != "")
        {
            if (X[X.Length - 1] > Y[Y.Length - 1])
            {
                Z = Z.Insert(0, X[X.Length - 1].ToString());
            }
            else if (X[X.Length - 1] < Y[Y.Length - 1])
            {
                Z = Z.Insert(0, Y[Y.Length - 1].ToString());
            }
            else
            {
                Z = Z.Insert(0, X[X.Length - 1].ToString());
                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();
    }
}