using C=System.Console;class X{static void Main(){for(;;)C.WriteLine(C.ReadLine().ToUpper()+'\n'+C.ReadLine().ToLower());}}