using System;

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

            //int i = 0;
            //long rez = 0;
            //while (x > 0 || y > 0)
            //{
            //    if (x % 10 != 0 || y % 10 != 0) {
            //        if (x % 10 > y % 10) rez += (x % 10) * Convert.ToInt64(Math.Pow(10, i));
            //        else if (x % 10 < y % 10) rez += (y % 10) * Convert.ToInt64(Math.Pow(10, i));
            //        else {
            //            rez += x % 10 * Convert.ToInt64(Math.Pow(10, i)) + y % 10 * Convert.ToInt64(Math.Pow(10, ++i));
            //        }
            //    }
            //    x /= 10;
            //    y /= 10;
            //    i++;
            //}

            string x = Console.ReadLine();
            string y = Console.ReadLine();
            string rez = "";

            int brx = x.Length - 1;
            int bry = y.Length - 1;
            while (brx >= 0 || bry >= 0)
            {
                if (brx < 0) rez = y[bry] + rez;
                else if (bry < 0) rez = x[brx] + rez;
                else if (x[brx] == '0' && y[bry] == '0') rez = "0" + rez;
                else if (x[brx] == y[bry]) rez = x[brx] + "" + x[brx] + rez;
                else if (x[brx] > y[bry]) rez = x[brx] + rez;
                else if (x[brx] < y[bry]) rez = y[bry] + rez;

                brx--;
                bry--;
            }

            Console.WriteLine(rez);
        }
    }
}