open Scanf
open Printf
open Char

let diagonal s1 s2 s3 = (escaped s1.[0]) ^ (escaped s2.[1]) ^ (escaped s3.[2])

let (s3 ,s2, s1) = (read_line (), read_line (), read_line ())
let () = printf "%s\n" @@ diagonal s1 s2 s3