using System;
using System.Net.Sockets;
using System.Net;
using System.IO;
using System.Text;


namespace Bruh{

    class Program{

         static void Main(string[] args){
            string s1 = Console.ReadLine().ToString();
            string s2 = Console.ReadLine().ToString();
            int k = s1.Length-s2.Length;
            char[] a = s1.ToCharArray();
            char[] b = s2.ToCharArray();
            string s = "";
            for(int i = a.Length-1;i>=Math.Abs(k);i--){
                if(a[i]>b[i]) s = a[i]+s;
                if(a[i]<b[i]) s = b[i]+s;
                if(a[i]==b[i]) {s = a[i]+s;s=b[i]+s;}
            }
            if(k>0)s=s1.Substring(k)+s;
            if(k<0)s=s2.Substring(0,Math.Abs(k))+s;
            Console.WriteLine(s);
         }
    }
}