import Control.Applicative

main :: IO ()
main = solve <$> getLine <*> getLine <*> getLine >>= putStrLn

solve :: String -> String -> String -> String
solve [c11, _, _] [_, c22, _] [_, _, c33] = [c11, c22, c33]
