main :: IO ()
main = do
    l1 <- getLine
    l2 <- getLine
    l3 <- getLine
    putStrLn $ diagonal l1 l2 l3

diagonal :: String -> String -> String -> String
diagonal (a:_) (_:b:_) cs = a : b : [last cs]