import std.stdio, std.algorithm, std.string, std.conv, std.array, std.range, std.math, core.stdc.stdio;

void main() {
    string[3] ss;
    foreach(ref s; ss) s = readln();
    writeln(ss[0][0], ss[1][1], ss[2][2]);
}