'use strict'

function main(input) {

    input = input.split(/\n/).map(v => v.split(''))

    let ans = ''
    for (let i = 0; i < 3; i++) {
        ans += input[i][i]

    }
    console.log(ans)

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));