using System;
using System.Collections;
using System.Linq;

public class Program
{
    public static string Rez(string a, string b)
    {
        string o = "";

        for (int i = 0; i < a.Length; i++)
        {

            try
            {
                int.Parse(a[i].ToString());
            }
            catch
            {
                o += b[i];
                continue;
            }

            try
            {
                int.Parse(b[i].ToString());
            }
            catch
            {
                o += a[i];
                continue;
            }

            if (int.Parse(a[i].ToString()) > int.Parse(b[i].ToString())) o += a[i];
            else
            {

                o += b[i];

                if (int.Parse(a[i].ToString()) == int.Parse(b[i].ToString())) o += a[i];

            }

        }

        return o;
    }

    public static void Main()
    {

        string a = Console.ReadLine();
        string b = Console.ReadLine();

        if (a.Length != b.Length)
        {

            int dif = (a.Length > b.Length) ? a.Length - b.Length : b.Length - a.Length;

            if (a.Length > b.Length)
            {

                for (int i = 0; i < dif; i++)
                {

                    b = "." + b;

                }

            }
            else
            {

                for (int i = 0; i < dif; i++)
                {

                    a = "." + a;

                }

            }

        }

        Console.WriteLine(Rez(a, b));

    }


}