"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const L1 = arg[0].split("");
    const L2 = arg[1].split("");
    const L3 = arg[2].split("");
    
    console.log(L1[0] + L2[1] + L3[2]);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));