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

namespace Takmicenje_2___1__Sudar_brojeva_
{
    class Program
    {
        static void Poredjenje (string x, string y)
        {
            if(x.Length < y.Length)
                x = x.PadLeft(y.Length, '.');
            else
                y = y.PadLeft(x.Length, '.');
            int i = 0;
            string z = "";
            while(i < x.Length)
            {
                if (x[i].CompareTo(y[i]) > 0) Console.Write(x[i]);
                else if (x[i].CompareTo(y[i]) < 0) Console.Write(y[i]);
                else
                   Console.Write(x[i].ToString() + x[i]);
                i++;
            }
        }
        static void Main(string[] args)
        {
            string x = Console.ReadLine();
            string y = Console.ReadLine();
            Poredjenje(x, y);
            Console.Read();
        }
    }
}