using System;
using System.Linq;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;

class Program
{
    public static string PrviZadatak(string max, string min)
    {
        StringBuilder novi = new StringBuilder("");
        int razlika = max.Length - min.Length;
        for(int i=0; i<razlika; i++)
        {
            novi.Append(max[i]);
        }
        for(int j=0; j<min.Length; j++)
        {
            if (min[j].CompareTo(max[j + razlika]) > 0)
                novi.Append(min[j]);
            else if (min[j].CompareTo(max[j + razlika]) < 0)
                novi.Append(max[j + razlika]);
            else
                novi.Append(min[j], 2);
        }
        return novi.ToString();
    }
    static void Main()
    {
        int a = int.Parse(Console.ReadLine());
        int b = int.Parse(Console.ReadLine());
        
        if(a > b)
        {
            Console.WriteLine(PrviZadatak(a.ToString(), b.ToString()));
        }
        else
        {
            Console.WriteLine(PrviZadatak(b.ToString(), a.ToString()));
        }
    }
}