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

namespace Petlja_Takmicenje
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string sx = Console.ReadLine();
            string sy = Console.ReadLine();
            string rez = "";
            int n;

            int[] x = new int[sx.Length];
            int[] y = new int[sy.Length];

            for (int i = 0; i < x.Length; i++)
            {
                x[i] = Convert.ToInt32(sx[sx.Length - 1 - i].ToString());
            }
            for (int i = 0; i < y.Length; i++)
            {
                y[i] = Convert.ToInt32(sy[sy.Length - 1 - i].ToString());
            }

            if (x.Length > y.Length)
            {
                n = x.Length;
            }
            else if (y.Length > x.Length)
            {
                n = y.Length;
            }
            else
            {
                n = x.Length;
            }

            for (int i = 0; i < n; i++)
            {
                if (i < x.Length && i < y.Length)
                {
                    if (x[i] > y[i])
                    {
                        rez += Convert.ToString(x[i]);
                    }
                    else if (y[i] > x[i])
                    {
                        rez += Convert.ToString(y[i]);
                    }
                    else
                    {
                        rez += x[i];
                        rez += y[i];
                    }
                }
                else
                {
                    if (i < x.Length)
                    {
                        rez += x[i].ToString();
                    }
                    else
                    {
                        rez += y[i].ToString();
                    }
                }


            }

            for (int i = 0; i < rez.Length; i++)
            {
                Console.Write(rez[rez.Length -1 - i]);
            }



            
            Console.ReadLine();
        }
    }
}