'use strict'

function main(s) {

  s = s.split('\n');
  const char1 = s[0][0];
  const char2 = s[1][1];
  const char3 = s[2][2];

  const ans = char1 + char2 + char3;
  console.log(ans);
}

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