import std.stdio;
import std.range;
import std.array;
import std.algorithm;
import std.string;

void main(){
    auto input_1 = readln.chomp;
    auto input_2 = readln.chomp;
    auto input_3 = readln.chomp;
    auto answer = "" ~ input_1[0] ~ input_2[1] ~ input_3[2];
    writeln(answer);
}