using System;

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string x = Console.ReadLine();
            string y = Console.ReadLine();

            int brx = x.Length - Math.Max(x.Length, y.Length);
            int bry = y.Length - Math.Max(x.Length, y.Length);
            while (brx <= x.Length && bry < y.Length)
            {
                if (brx < 0) Console.Write(y[bry]);
                else if (bry < 0) Console.Write(x[brx]);
                else if (x[brx] == '0' && y[bry] == '0') Console.Write("0");
                else if (x[brx] == y[bry]) Console.Write(x[brx] + "" + x[brx]);
                else if (x[brx] > y[bry]) Console.Write(x[brx]);
                else if (x[brx] < y[bry]) Console.Write(y[bry]);

                brx++;
                bry++;
            }
        }
    }
}