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 string 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) z += x[i];
                else if (x[i].CompareTo(y[i]) < 0) z += y[i];
                else
                    z += x[i].ToString() + x[i];
                i++;
            }
            return z;
        }
        static void Main(string[] args)
        {
            string x = Console.ReadLine();
            string y = Console.ReadLine();
            Console.WriteLine(Poredjenje(x, y));
        }
    }
}