import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    //nextLineとnextを同時に使ったら死ぬ
    val sc = new Scanner(System.in)
    val s = Array.fill(3)(sc.next())
    println(Array(s(0)(0), s(1)(1), s(2)(2)).mkString)
  }
  def debug(args: Any*): Unit = {
    Console.err.println(args.mkString(" "))
  }
}
