using System;

class Takmicenje
{
    static void Main()
    {
        int mx, my, a = 10, n = 1, l = 10;
        string q = "";
        int x = int.Parse(Console.ReadLine());
        int y = int.Parse(Console.ReadLine());
        if (x >= y)
        {
            do
            {
                if (x / n == 0)
                {
                    break;
                }

                mx = (x % a) / n;
                my = (y % a) / n;
                if (mx == my)
                {
                    string k = Convert.ToString(mx);
                    string k2 = Convert.ToString(my);
                    q += k + k2;
                }
                else
                {



                    int r = Math.Max(mx, my);
                    string p = Convert.ToString(r);
                    q += p;
                }

                a *= 10;

                n *= 10;


            }
            while (true);
        }
        else if (x < y)
        {
            do
            {
                if (y / n == 0)
                {
                    break;
                }

                mx = (x % a) / n;
                my = (y % a) / n;
                if (mx == my)
                {
                    string k1 = Convert.ToString(mx);
                    string k2 = Convert.ToString(my);
                    q += k1 + k2;
                }
                else
                {
                    int r = Math.Max(mx, my);
                    string p = Convert.ToString(r);
                    q += p;
                }

                a *= 10;

                n *= 10;


            }

            while (true);
            for (int i = q.Length - 1; i >= 0; i--)

            {

                Console.Write(q[i]);

            }

        }

    }
}