{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import           Control.Monad (replicateM)

main :: IO ()
main = do
  css <- replicateM 3 getLine
  let c00 = css !! 0 !! 0
      c11 = css !! 1 !! 1
      c22 = css !! 2 !! 2
  putStrLn $ c00 : c11 : c22 : ""
