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

namespace Takmicenje___2022_11_19
{
    internal class Program
    {
        static void prvi()
        {
            char[] x = Console.ReadLine().Trim().Reverse().ToArray();
            char[] y = Console.ReadLine().Trim().Reverse().ToArray();
            StringBuilder bob = new StringBuilder();
            if(x.Length > y.Length)
            {
                for (int i = 0; i < y.Length; i++)
                {
                    int a = int.Parse(x[i].ToString());
                    int b = int.Parse(y[i].ToString());
                    if (a > b)
                    {
                        bob.Append(x[i]);
                    }
                    else if (a < b) bob.Append(y[i]);
                    else
                    {
                        bob.Append(x[i]);
                        bob.Append(y[i]);
                    }
                }
                for (int i = y.Length; i < x.Length; i++)
                {
                    bob.Append(x[i]);
                }
            }
            else
            {
                for (int i = 0; i < x.Length; i++)
                {
                    int a = int.Parse(x[i].ToString());
                    int b = int.Parse(y[i].ToString());
                    if (a > b)
                    {
                        bob.Append(x[i]);
                    }
                    else if (a < b) bob.Append(y[i]);
                    else
                    {
                        bob.Append(x[i]);
                        bob.Append(y[i]);
                    }
                }
                for (int i = x.Length; i < y.Length; i++)
                {
                    bob.Append(y[i]);
                }
            }
            Console.WriteLine(new string(bob.ToString().Reverse().ToArray()));
        }
        static void Main(string[] args)
        {
            prvi();
        }
    }
}