'use strict'

const main = input => {
	const args = input.split('\n').map(arg => arg.split(' '))
	console.log(`${args[0][0][0]}${args[1][0][1]}${args[2][0][2]}`)
}

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