function Main(input){
	var xs = input.trim().split('\n');
    var a = xs[0][0];
    var b = xs[1][1];
    var c = xs[2][2];
    console.log(a+b+c);
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));