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

namespace zad1k1
{
    internal class Program
    {
        static void uporedi(string c, string c1, ref string s2)
        {
            if (int.Parse(c) > int.Parse(c1))
            {
                s2 += c;
            }
            else
            {
                if (int.Parse(c) < int.Parse(c1))
                {
                    s2 += c1;
                }
                else
                {
                    s2 += c; s2 += c1;
                }
            }

        }
        static void izjednaci(ref string a, string b)
        {
            while (a.Length != b.Length)
                a = a.Insert(0, "0");
        }
        static void sudar(string s, string s1, ref string s2,int n)
        {
            while (s.Length != n)
            {
                uporedi(Convert.ToString(s[n]), Convert.ToString(s1[n]), ref s2);
                s=s.Remove(n, 1);
                s1=s1.Remove(n, 1);
            }

        }
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string s1 = Console.ReadLine();
            string s2 = "";
            int n=0;
            if (s.Length > s1.Length)
            {                
                n = s.Length - s1.Length;
                s2 = s.Substring(0, n);
                izjednaci(ref s1, s);
                sudar(s1, s, ref s2, n);
            }
            else
            {                
                n = s1.Length - s.Length;
                s2 = s1.Substring(0, n);
                izjednaci(ref s, s1);
                sudar(s, s1, ref s2, n);
            }
            Console.WriteLine(s2);
            Console.ReadLine();
        }
    }
}