using System;
class HelloWorld 
{
    static void Main() 
    {
        string s1 = Console.ReadLine();
        string s2 = Console.ReadLine();
        char[] n = new char[Math.Max(s1.Length, s2.Length)];
        char[] m = new char[Math.Min(s1.Length, s2.Length)];
        int lenn = s1.Length, lenm = s2.Length;
        if(s1.Length >= s2.Length)
        {
            n = s1.ToCharArray();
            m = s2.ToCharArray();
        }
        else
        {
            n = s2.ToCharArray();
            m = s1.ToCharArray();
            lenn = s2.Length;
            lenm = s1.Length;
        }
        for(int i = 0; i < lenn; i++)
        {
            int x = lenn-lenm;
            if(i >= x)
            {
                if(n[i] > m[i-x])
                {
                    Console.Write((int)n[i] - 48);
                }
                else if(n[i] < m[i-x])
                {
                    Console.Write((int)m[i-x] - 48);
                }
                else
                {
                    Console.Write((int)n[i] - 48);
                    Console.Write((int)m[i-x]- 48);
                }
            }
            else
            {
                Console.Write((int)n[i] - 48);
            }
        }
    }
}