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

namespace ConsoleApp33
{
    class Program
    {
        static void Main(string[] args)
        {
            
            int x = int.Parse(Console.ReadLine());
            
            int y = int.Parse(Console.ReadLine());
            string c="";
            while (y>0 || x>0)
            {
                if (y % 10 > x % 10) c = y % 10 + "" + c;
                else if ((x % 10 > y % 10)) c = x % 10 + "" + c;
                if (y != 0 || x % 10 != 0 && x != 0 || y % 10 != 0)
                {
                    if (y % 10 == x % 10) c = y % 10 + "" + x % 10 + "" + c;
                }
                else c = 0 + "" + c;
                
                y =  y / 10;
                x =  x / 10;
            }
            Console.WriteLine(c);
            
        }

    }
}