object Main {
  def main(args: Array[String]): Unit = {
    val arr: Array[String] = new Array[String](3)
    arr.update(0, io.StdIn.readLine().mkString)
    arr.update(1, io.StdIn.readLine().mkString)
    arr.update(2, io.StdIn.readLine().mkString)

    for (i: Int <- 0 to 2)
     print(arr(i)(i))
    
  }
}
