#include <bits/stdc++.h>
using namespace std;
int main() {
  string l1, l2, l3, ans;
  cin >> l1 >> l2 >> l3;
  ans = l1.substr(0, 1) + l2.substr(1, 1) + l3.substr(2, 2);
  cout << ans << endl;
  return 0;
}
