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

namespace ConsoleApplication32
{
    class Program
    {
        static void Main(string[] args)
        {
            long x = long.Parse(Console.ReadLine());
            long y = long.Parse(Console.ReadLine());
            long m = Math.Max(x, y);

            
            //broj cifara veceg
            int k = 1;
            while (m / 10 > 0) 
            {
                m = m / 10;
                k++;
            } 

           
            long min=Math.Min(x,y);

            int n = 1;
            while (min / 10 > 0)
            {
                min = min / 10;
                n++;
            } 
          
            string l="";
            for (int i = k; i >k- n; i--)
            {
                if (x % 10 > y % 10) l = x % 10 +l;
                else if (x % 10 < y % 10) l = y % 10 + l;
               
                else if (x % 10 == y % 10) l = x % 10 + "" + y % 10+l;
                x /= 10;
                y /= 10;
            }
            if (x > 0 && y==0) l = x + l;
            if (y>0 && x==0)l = y + l;
            Console.WriteLine(l);
            //Console.ReadLine();
        }
    }
}