using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace takmicenjeprvi
{
    internal class Program
    {
   
        static void Main(string[] args)
        {
            int x = int.Parse(Console.ReadLine());
            int y = int.Parse(Console.ReadLine());
            StringBuilder z = new StringBuilder();
            while (Math.Max(x, y) > 0)
            {
                if (x % 10 > y % 10) z.Append(x % 10);
                else if (x % 10 < y % 10) z.Append(y % 10);
                else if(x==y%10 && x%10==0) z.Append(x % 10); 
                else 
                {
                    z.Append(x % 10);
                    z.Append(x % 10);
                }
                x /= 10;
                y /= 10;
            }
            for (int i = z.ToString().Length-1; i >= 0; i--)
            {
                Console.Write(z.ToString()[i]);
            }
            Console.WriteLine();
        }
    }
}