using System;
class HelloWorld
{
    static void Main()
    {
        long X = long.Parse(Console.ReadLine());
        long Y = long.Parse(Console.ReadLine());
        long [] niz = new long [100];
        long d = 0, x = 0, y = 0;
        while(X>0 && Y>0)
        {
            x = X%10;
            y = Y%10;
            if(x > y)
            {
                niz[d++] = x;
            }
            else if (y > x)
            {
                niz[d++] = y;
            }
            else
            {
                niz[d++] = x;
                niz[d++] = y;
            }
            X/=10;
            Y/=10;
        }
        while(X>0)
        {
            niz[d++] = X%10;
            X/=10;
        }
        while(Y>0)
        {
            niz[d++] = Y%10;
            Y/=10;
        }
        long i = 0;
        for(i=d-1; i>=0; i--)
        {
            Console.Write(niz[i]);
        }
    }
}