object Main extends App {
	val a = scala.io.StdIn.readLine.toArray
	val b = scala.io.StdIn.readLine.toArray
	val c = scala.io.StdIn.readLine.toArray

	println(a(0).toString + b(1).toString + c(2).toString)
}
