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)+lines(1)(1)+lines(2)(2))
  }
}