using System;

namespace ConsoleApp2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int[] br1 = new int[100];
            int[] br2 = new int[100];
            int j = 0, d = 0;
            int x = int.Parse(Console.ReadLine());
            for (int i = 0; x != 0; i++)
            {
                br1[i] = x % 10;
                x = x / 10;
                j++;
            }
            x = int.Parse(Console.ReadLine());
            for (int i = 0; x != 0; i++)
            {
                br2[i] = x % 10;
                x = x / 10;
                d++;
            }
            int br = 0;
            int[] nbr = new int[100];
            if (j == d)
            {
                for (int i = 0; i < j; i++)
                {
                    if (br1[i] > br2[i])
                    {
                        nbr[br] = br1[i];
                        br++;
                    }
                    else if (br2[i] > br1[i])
                    {
                        nbr[br] = br2[i];
                        br++;
                    }
                    else
                    {
                        nbr[br] = br1[i];
                        br++;
                        nbr[br] = br2[i];
                        br++;
                    }
                }
            }
            else if (j > d)
            {
                int h = 0;
                for (h = 0; h < d; h++)
                {
                    if (br1[h] > br2[h])
                    {
                        nbr[br] = br1[h];
                        br++;
                    }
                    else if (br2[h] > br1[h])
                    {
                        nbr[br] = br2[h];
                        br++;
                    }
                    else
                    {
                        nbr[br] = br1[h];
                        br++;
                        nbr[br] = br2[h];
                        br++;
                    }
                }
                for (int i = h; i < j; i++)
                {
                    nbr[br] = br1[i];
                    br++;
                }
            }
            else
            {
                int h = 0;
                for (h = 0; h < j; h++)
                {
                    if (br1[h] > br2[h])
                    {
                        nbr[br] = br1[h];
                        br++;
                    }
                    else if (br2[h] > br1[h])
                    {
                        nbr[br] = br2[h];
                        br++;
                    }
                    else
                    {
                        nbr[br] = br1[h];
                        br++;
                        nbr[br] = br2[h];
                        br++;
                    }
                }
                for (int i = h; i < d; i++)
                {
                    nbr[br] = br2[i];
                    br++;
                }
            }
            for (int i = br-1; i>=0; i--)
            {
                Console.Write(nbr[i]);
            }
        }
    }
}