using System;

namespace _2
{
    class Program
    {
        static void Main(string[] args)
        {
            string a, b, c = "";
            a = Console.ReadLine();
            b = Console.ReadLine();
            if (a.Length < b.Length)
            {
                while (a.Length != b.Length) a.Insert(0," ");
            }
            else if (a.Length > b.Length) b.Insert(0," ");
            Console.WriteLine("{0}.\n{1}", a, b);   
            for (int i = 0; i < b.Length; i++)
            {
                if (a[i] == b[i])
                {
                    c += a[i];
                    c += a[i];
                }
                else if (a[i] > b[i]) c += a[i];
                else c += b[i];
            }
            Console.WriteLine(c);
            Console.ReadKey();
        }
    }
}