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

namespace SudarBrojeva
{
    class Program
    {
        static string obrni(string s)
        {
            char[] c = s.ToCharArray();
            string s2 = "";
            for (int i = c.Length - 1; i >= 0; i--)
            {
                s2 += c[i];
            }
            return s2;
        }
        static void sudar(int x, int y)
        {
            int m = 0;
            if (x > y)
                m = x;
            else
                m = y;
            int br = 0; //broj cifara
            while (m != 0)
            {
                br++;
                m /= 10;
            }
            string s = "";
            for (int i = 1; i <= br; i++)
            {
                double a = x % 10;
                double b = y % 10;
                if (x == 0)
                    a = -1;
                if (y == 0)
                    b = -1;
                if (a > b)
                    s += a;
                else if (b > a)
                    s += b;
                else if ((a != -1 && b != -1) && a == b)
                {
                    s += a;
                    s += a;
                }
                else 
                {

                }
                x /= 10;
                y /= 10;
            }
            Console.WriteLine(obrni(s));
        }
        static void Main(string[] args)
        {
            int x = int.Parse(Console.ReadLine());
            int y = int.Parse(Console.ReadLine());
            sudar(x, y);
        }
    }
}