"use strict";

function main(arg) {
    const letters = arg.split("\n");
    let   answer;
    
    for(let i=0; i<letters.length; i++) {
        if(answer) {
            answer += letters[i].split("")[i];
        } else {
            answer  = letters[i].split("")[i];
        }
    }   
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));