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

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