'use strict';

const receive = require('fs')
  .readFileSync('/dev/stdin', 'utf8')
  .split(/\s/);

const main = input => {
  const c = input.filter(x => x);
  const ans = c[0][0] + c[1][1] + c[2][2];
  console.log(ans);
};

main(receive);