function Main(input){
  input = input.split('\n');

  var ans = '';
  for(var i=0; i<3; i++){
    ans += (input[i])[i];
  }

  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
