function main(input) {
  input=input.trim();
  const a = input.split("\n")[0].slice(0,1);
  const b = input.split("\n")[1].slice(1,1);
  const c = input.split("\n")[2].slice(2,1);



  console.log(a+b+c);

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

