string x = Console.ReadLine();
            string y = Console.ReadLine();

            char[] r = new char[100];

            int i = 0;



            int index = 0;

            for (i = 1; i < 100; i++)
            {
                if(i <= x.Length && i <= y.Length && x[x.Length - i] > y[y.Length - i])
                {
                    r[index] = x[x.Length - i];
                    index++;
                }

                if (i <= x.Length && i <= y.Length && x[x.Length - i] < y[y.Length - i])
                {
                    r[index] = y[y.Length - i];
                    index++;
                }

                if (i <= x.Length && i <= y.Length && x[x.Length - i] == y[y.Length - i])
                {
                    r[index++] = y[y.Length - i];
                    r[index] = y[y.Length - i];
                    index++;
                }

            }

            for(i = index-1; i >= 0; i--)
            {
                Console.Write(r[i]);
                
            }

            Console.WriteLine();