import scala.io._
object Main{
	def main(args: Array[String]) {
		val input = Source.fromInputStream(System.in)
		val lines = input.getLines.toSeq
		println(lines(0)(0).toString+lines(1)(1).toString+lines(2)(2).toString)
	}
}