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

namespace Takmicenje
{
    internal class Program
    {
        static void Main(string[] args)
        {       
            int x = int.Parse(Console.ReadLine());
            int y = int.Parse(Console.ReadLine());
            string temp = "";

            while (x>0||y>0)
            {
                int a = x % 10;
                int b = y % 10;
                if (y == 0 && a == 0 || x == 0 && b == 0) 
                {
                    temp = 0 + "" + temp;
                }
                else
                {
                    if (a > b) temp = a + temp;
                    else if (a == b) temp = a + "" + b + temp;
                    else temp = b + temp;
                }
                x = x / 10;
                y = y / 10;
            }
            Console.WriteLine(temp);
        }
    }
}