class Program
    {
        static void Main(string[] args)
        {
            int x, y;
            x= int.Parse(Console.ReadLine());
            y= int.Parse(Console.ReadLine());
            int xc = x;
            int yc = y;
            int xcb = 0;
            int ycb = 0;
            while(xc!=0)
            {
                xc /= 10;
                xcb++;
            }
            while (yc != 0)
            {
                yc /= 10;
                ycb++;
            }
            int max = 0;
            int min = 0;
            if (xcb >= ycb)
            {
                max = xcb;
                min = ycb;
            }
            else
            {
                max = ycb;
                min = xcb;
            }
            int j = 0;
            int xp = 0;
            int yp = 0;
            int z = 0;
            for(int i=0; i<=max;i++)
            {
                xp = x % 10;
                yp = y % 10;
                if(xp>yp)
                {
                    z += xp*(int)Math.Pow(10,j);
                }
                else if(yp>xp)
                {
                    z += yp * (int)Math.Pow(10, j);
                }
                else if(i<min)
                {
                    z+= xp * (int)Math.Pow(10, j);
                    j++;
                    z += yp * (int)Math.Pow(10, j);
                }
                j++;
                x /= 10;
                y /= 10;
            }
            Console.WriteLine(z);
        }
    }