// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

void solveA()

{

  long long a,b,tem;

  cin>>a>>b;

  tem=(a+b);

  if(tem%2==0)

  {

    cout<<tem/2<<endl;

  }

  else

  {

    cout<<"IMPOSSIBLE"<<endl;

  }

}

void solveB()

{

  int n,i,j,count;

  cin>>n;

  int ar[n];

  for(i=0;i<n;i++)

  {

    cin>>ar[i];

  }

  j=1;

  count=0;

  for(i=0;i<n;i++)

  {

    if(ar[i]!=j)

    {

      count++;

    }

    if(count>2)

    {

      cout<<"NO"<<endl;

      return;

    }

    j++;

  }

  cout<<"YES"<<endl;

}

void solveC()

{

  int a,b,x,y;

  cin>>a>>b;

  x=max(a,b);

  y=min(a,b);

  if((x-y)>=2)

  {

    cout<<2*x-1<<endl;

  }

  else

  {

    cout<<x+y<<endl;

  }

}

void solveD()

{

  int n,i,j;

  cin>>n;

  int ar[n];

  for(i=0;i<n;i++)

  {

    cin>>ar[i];

  }

  int count=n;

  for(i=n-1;i>=0;i--)

  {

    for(j=i-1;j>=0;j--)

    {

      if(ar[i]<ar[j])

      {

        count--;

        break;

      }

    }

  }

  cout<<count<<endl;

}

void solveE()

{

  int h,w,x,y,H,W;

  cin>>H>>W;

  cin>>h>>w;

  x=h*W;

  y=(H-h)*w;

  cout<<(H*W)-(x+y)<<endl;

}

void solveF()

{

  int n,m,c,i,j;

  cin>>n>>m>>c;

  int b[m];

  int ar[n][m];

  for(i=0;i<m;i++)

  {

    cin>>b[i];

  }

  for(i=0;i<n;i++)

  {

    for(j=0;j<m;j++)

    {

      cin>>ar[i][j];

    }

  }

  int count=0;

  int sum;

  for(i=0;i<n;i++)

  {

    sum=0;

    for(j=0;j<m;j++)

    {

      sum=sum+ar[i][j]*b[j];

    }

    if((sum+c)>0)

    {

      count++;

    }

  }

  cout<<count<<endl;

}

void solveG()

{

  int a,b,c,tem;

  cin>>a>>b>>c;

  tem=b/a;

  if(tem>c)cout<<c<<endl;

  else cout<<tem<<endl;

}

void solveH()

{

  int a,b,c,tem,i;

  cin>>a>>b>>c;

  tem=min(a,b);

  vector<int>vec;

  for(i=1;i<=tem;i++)

  {

    if(a%i==0&&b%i==0)

    {

      vec.push_back(i);

    }

  }

  cout<<vec[vec.size()-c]<<endl;

}

void solveI()

{

  double t,x;

  cin>>t>>x;

  cout<<fixed<<setprecision(10)<<t/x<<endl;

}

void solveJ()

{

  int n,i;

  cin>>n;

  int ar[n];

  for(i=0;i<n;i++)

  {

    cin>>ar[i];

  }

  sort(ar,ar+n);

  int sum=0;

  for(i=0;i<n-1;i++)

  {

    sum=sum+ar[i];

  }

  if(ar[n-1]<sum)cout<<"Yes"<<endl;

  else cout<<"No"<<endl;

}

void solveK()

{

  int A,B,x,y;

  cin>>A>>B;

  x=max((A+B),(A-B));

  y=max(x,A*B);

  cout<<y<<endl;

}

void solveM()

{

  int i,j;

  char ar[3][3];

  for(i=0;i<3;i++)

  {

    for(j=0;j<3;j++)

    {

      cin>>ar[i][j];

    }

  }

  for(i=0;i<3;i++)

  {

    for(j=0;j<3;j++)

    {

      if(i==j)cout<<ar[i][j];

    }

  }

}

int main()

{

  // solveA();

  //solveB();

  // solveC();

  // solveD();

// solveE();

 //solveF();

// solveG();

//solveH();

//solveI();

//solveJ();

//solveK();

solveM();

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.304990242128774x):
#include <cstdio>

#include <cstring>

using namespace std;



char s[10];



int main() {

    for(int i = 0; i < 3; i++) {

        scanf("%s", s);

        if(i == 0)

            printf("%c", s[0]);

        if(i == 1)

            printf("%c", s[1]);

        if(i == 2)

            printf("%c", s[2]);

    }

    printf("\n");

}