import java.util.*

fun main(args: Array<String>) {
    val sc = java.util.Scanner(System.`in`)
    val a = sc.next()
    val b = sc.next()
    val c = sc.next()

    println(sequenceOf(a[0], b[1], c[2]).joinToString(""))
}

