function Main(input) {
  input = input.trim()
 input = input.split("\n");
console.log(""+input[0].slice(0,1)+""+input[1].slice(1,2)+input[2].slice(2,3))
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));