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

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