using C=System.Console;class M{static void Main(){for(int i=0;;)C.WriteLine(C.ReadLine()[i++%3*2]);}}