Problem:
 Score : 100 points    Problem Statement We have a 3×3 square grid, where each square contains a lowercase English letters.
The letter in the square at the i -th row from the top and j -th column from the left is c_{ij} .  Print the string of length 3 that can be obtained by concatenating the letters in the squares on the diagonal connecting the top-left and bottom-right corner of the grid, from the top-left to bottom-right.      Constraints  Input consists of lowercase English letters.         Input Input is given from Standard Input in the following format:  c_{11}c_{12}c_{13}  c_{21}c_{22}c_{23}  c_{31}c_{32}c_{33}       Output Print the string of length 3 that can be obtained by concatenating the letters on the diagonal connecting the top-left and bottom-right corner of the grid, from the top-left to bottom-right.        Sample Input 1 ant
obe
rec      Sample Output 1 abc  The letters in the squares on the diagonal connecting the top-left and bottom-right corner of the grid are a , b and c from top-right to bottom-left. Concatenate these letters and print abc .       Sample Input 2 edu
cat
ion      Sample Output 2 ean

Solution (Python):
l1 = input()[0]
l2 = input()[1]
l3 = input()[2]
ans = l1 + l2 + l3
print(ans)

Solution (Python):
ans = ''
for i in range(3):
  ans += input()[i]
print(ans)

Solution (Python):

A = input()
B = input()
C = input()
print(A[0] + B[1] + C[2])

Solution (Python):
C = [input() for _ in range(3)]

print(C[0][0] + C[1][1] + C[2][2])

Solution (Python):
List = [input() for _ in range(3)]
for i in range(3):
    print(List[i][i],end="")
print("\n",end="")

Solution (Python):
import itertools
def main():
  a = []
  for i in range(3):
    s = input()
    a.append(s[i])
  print('{}{}{}'.format(a[0],a[1],a[2]))
if __name__ == '__main__':
  main()

Solution (Python):
A = input()
B = input()
C = input()

print(A[0] + B[1] + C[2])

Solution (Python):
a = input()
b = input()
c = input()
 
print(a[0]+b[1]+c[2])

Solution (Python):
s=[input()[i] for i in range(3)]
print("".join(s))

Solution (Python):
a = input()
b = input()
c = input()

print(a[0]+b[1]+c[2])

Solution (Python):
c = [str(input()) for _ in range(3)]
print(c[0][0]+c[1][1]+c[2][2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0] + c2[1] + c3[2])

Solution (Python):
import sys

s = sys.stdin.read().split()

def main():
    t = ''
    for i in range(3): t += s[i][i]
    print(t)

if __name__ ==  '__main__':
    main()

Solution (Python):
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])

Solution (Python):

c = [input() for _ in range(3)]
print(c[0][0] + c[1][1] + c[2][2])

Solution (Python):
a = input()
b = input()
c = input()

print(a[0]+b[1]+c[2])

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy
A = input()
B = input()
C = input()
print("" + A[0] + B[1] + C[2])

Solution (Python):
s1=input()
s2=input()
s3=input()
ans=s1[0]+s2[1]+s3[2]
print(ans)

Solution (Python):
ans = ''
ans += input()[0]
ans += input()[1]
ans += input()[2]
print(ans)

Solution (Python):
ans = ""
for i in range(3):
    c = input()
    ans += c[i]

print(ans)

Solution (Python):
C1= input()
C2= input()
C3= input()

print(C1[0] + C2[1] + C3[2])

Solution (Python):
C1= input()
C2= input()
C3= input()

print(C1[0] + C2[1] + C3[2])

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = input()
    b = input()
    c = input()

    print(a[0]+b[1]+c[2])

Solution (Python):
a = list(input())
b = list(input())
c = list(input())
print(a[0], b[1], c[2], sep="")

Solution (Python):
c1=str(input())
c2=str(input())
c3=str(input())
print(c1[0]+c2[1]+c3[2])

Solution (Python):
a, b, c = input(), input(), input()
print('{}{}{}'.format(a[0], b[1], c[2]));

Solution (Python):
c = [list(input()) for _ in range(3)]

ans = []
for i in range(3):
  ans.append(c[i][i])
  
joi = ''.join(ans)
print(joi)

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
N = input()
H = input()
K = input()
print((N[0])+(H[1])+(K[2]))

Solution (Python):
c1=input()
c2=input()
c3=input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
A,B,C= map(str,input())
D,E,F= map(str,input())
G,H,I= map(str,input())
print(A+E+I)

Solution (Python):
c = [input() for i in range(3)]
print(c[0][0]+c[1][1]+c[2][2])

Solution (Python):
import numpy as np
c = ''
for i in range(3):
  c += input()
print(c[0] + c[4] + c[8])

Solution (Python):
D = input
print(D()[0]+D()[1]+D()[2])

Solution (Python):
A=list(input())
B=list(input())
C=list(input())
print(A[0]+B[1]+C[2])

Solution (Python):
ans = []
for i in range(3):
  ans.append(input()[i])
ans = ''.join(ans)
print(ans)

Solution (Python):
a = input()
b = input()
c = input()

print(a[0]+b[1]+c[2])

Solution (Python):
import math



a=input()
b=input()
c=input()

print(a[0]+b[1]+c[2])

Solution (Python):
A, B, C = input()
D, E, F = input()
G, H, I = input()
print(A,E,I,sep="")

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
print(input()[0] + input()[1] + input()[2])

Solution (Python):
s = input()
t = input()
u = input()
print(s[0] + t[1] + u[2])

Solution (Python):
x=input()
y=input()
z=input()
print(x[0]+y[1]+z[2])

Solution (Python):
def main():
    c1 = list(input())
    c2 = list(input())
    c3 = list(input())

    ans = ''
    ans += c1[0] + c2[1] + c3[2]
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
a=str(input())
b=str(input())
c=str(input())
print(a[0]+b[1]+c[2])

Solution (Python):
c = [input() for _ in range(3)]
print(''.join(c[0][0]+c[1][1]+c[2][2]))

Solution (Python):
c1 = input()[0]
c2 = input()[1]
c3 = input()[2]
print(c1+c2+c3)

Solution (Python):
a,b,c=[input() for i in range(3)]
print(a[0]+b[1]+c[2])

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
a=str(input())
b=str(input())
c=str(input())
t=''
t=a[0]+b[1]+c[2]
print(t)

Solution (Python):
a=list(input())
b=list(input())
c=list(input())
print(a[0]+b[1]+c[2])

Solution (Python):
x = input()
y = input()
z = input()
print(x[0]+y[1]+z[2])

Solution (Python):
x = input()
y = input()
z = input()
a = x + y + z
print(a[0::4])

Solution (Python):
a=input()
b=input()
c=input()

print(a[0],end="")
print(b[1],end="")
print(c[2])

Solution (Python):

a = [input() for i in range(3)]
print(a[0][0] + a[1][1] + a[2][2])

Solution (Python):
s = [input() for i in range(3)]
print(s[0][0], s[1][1], s[2][2], sep='')

Solution (Python):
for i in range(3):
  line = input()
  print(line[i],end="")

Solution (Python):
for i in range(3):
  line = input()
  print(line[i],end="")

Solution (Python):
a=input()
b=input()
c=input()

print(a[0]+b[1]+c[2])

Solution (Python):
s1 = input()
s2 = input()
s3 = input()

print(s1[0] + s2[1] + s3[2])

Solution (Python):
a, b, c = [input() for s in range(3)]
print(a[0]+b[1]+c[2])

Solution (Python):
def Diagonal_String(c1, c2, c3):

    return c1[0] + c2[1] + c3[2]

def main():
    c1 = str(input())
    c2 = str(input())
    c3 = str(input())
    print(Diagonal_String(c1 , c2 , c3))

if __name__ == '__main__':
    main()

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
css = [input().rstrip() for _ in range(3)]

ans = ''
for i in range(3):
    ans += css[i][i]

print(ans)

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
a = list(input())
b = list(input())
c = list(input())

l = a[0] + b[1] + c[2]
print(l)

Solution (Python):
c=[str(i) for i in open(0)]
ans=c[0][0]+c[1][1]+c[2][2]
print(ans)

Solution (Python):
c1=input()
c2=input()
c3=input()

print(c1[0]+c2[1]+c3[2])

Solution (Python):

c=[]
for i in range(3):
    line=input()
    c.append(line)
print(c[0][0]+c[1][1]+c[2][2])

Solution (Python):
c1 = [""] * 3
c2 = [""] * 3
c3 = [""] * 3
for i in range(3):
  c1[i],c2[i],c3[i] = list(str(input()))
ans = ""
ans += c1[0]
ans += c2[1]
ans += c3[2]
print(ans)

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):

def main():
    import sys
    
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    
    from itertools import combinations, permutations
    
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    

    

    a = input().rstrip()
    b = input().rstrip()
    c = input().rstrip()
    print(a[0]+b[1]+c[2])


if __name__ == '__main__':
    main()

Solution (Python):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

m = nsn(3)

print(m[0][0] + m[1][1] + m[2][2])

Solution (Python):
for i in range(3):
    c = input()
    print(c[i],end='')

Solution (Python):
c = [list(input()) for _ in range(3)]
print(c[0][0] + c[1][1] + c[2][2])

Solution (Python):
A=input()
B=input()
C=input()
print(A[0],end="")
print(B[1],end="")
print(C[2])

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
tmp = 0
s = ""
for i in range(3):
    a = input()
    s += a[tmp]
    tmp += 1
print(s)

Solution (Python):
A, B, C = [input() for i in range(3)]

print(A[0:1] + B[1:2] + C[2:])

Solution (Python):
print(input()[0] + input()[1] + input()[2])

Solution (Python):
a = input()
b = input()
c = input()
print(a[0] + b[1] + c[2])

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

c = [STR() for _ in range(3)]
print(c[0][0] + c[1][1] + c[2][2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()

print(c1[0] + c2[1] + c3[2])

Solution (Python):
s = input()
s1 = input()
s2 = input()
print(s[0]+s1[1]+s2[2])

Solution (Python):
a= input()
b= input()
c= input()

print(a[0] + b[1] + c[2])

Solution (Python):

a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
c = [list(input()) for _ in range(3)]
print(c[0][0],c[1][1],c[2][2],sep='')

Solution (Python):
c = []
for _ in range(3):
    c.append(input())

print(c[0][0],c[1][1],c[2][2], sep="")

Solution (Python):
c1 = input()
c2 = input()
c3 = input()

print(c1[0], c2[1], c3[2], sep='')

Solution (Python):
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])

Solution (Python):
a = input()
b = input()
c = input()
print(a[0] + b[1] + c[2])

Solution (Python):
a,b,c=[input() for _ in range(3)]
print(a[0],b[1],c[2], sep="")

Solution (Python):
c=[input() for _ in range(3)]
for i in range(3):
    print(c[i][i],end='')
print()

Solution (Python):
c = [input() for i in range(3)]
for i in range(3):
    print(c[i][i],end='')

Solution (Python):
a = input()
b = input()
c = input()
print(a[0],b[1],c[2],sep="")

Solution (Python):
s1 = input()
s2 = input()
s3 = input()

print(s1[0] + s2[1] + s3[2])

Solution (Python):
result=""
for i in range(3):
  temp=input()
  result+=temp[i]
print(result)

Solution (Python):
dat =[]
dat.append(input())
dat.append(input())
dat.append(input())
print(dat[0][0] + dat[1][1] + dat[2][2])

Solution (Python):
c = []
for i in range(3):
    c.append(input())

for i in range(3):
    for j in range(3):
        if i == j:
            print(c[i][j],end="")
print()

Solution (Python):
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])

Solution (Python):
a = [input() for i in range(3)]
print(a[0][0]+a[1][1]+a[2][2])

Solution (Python):
res = ''
for i in range(3):
  s = input()
  res += s[i]
print(res)

Solution (Python):
a = ""
for i in range(3):
  s = input()
  a += s[i]
print(a)

Solution (Python):
list1 = [list(input()) for i in range(3)]
print(list1[0][0] + list1[1][1] + list1[2][2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
a = [input() for i in range(3)]
print(a[0][0]+a[1][1]+a[2][2], sep='')

Solution (Python):


L  = []
for i in range(3):
    L.append(input())

ans = ''
for i in range(3):
    ans += L[i][i]
    
print(ans)

Solution (Python):
import sys
a = [[str(i) for i in l.strip()] for l in sys.stdin]
print(a[0][0]+a[1][1]+a[2][2])

Solution (Python):
a,b,c=[input() for i in range(3)]
print(a[0]+b[1]+c[2])

Solution (Python):
l = [input() for _ in range(3)]

print(l[0][0]+l[1][1]+l[2][2])

Solution (Python):
a= input()
b= input()
c= input()
print(a[0]+b[1]+c[2])

Solution (Python):

c=''
for i in range(3):
    c+=input()[i]
print(c)

Solution (Python):
if __name__ == '__main__':

    ans = ""
    for i in range(3):
        ans += input()[i]

    print(ans)

Solution (Python):
print('{}{}{}'.format(input()[0], input()[1], input()[2]))

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
c = [input() for _ in range(3)]
print(c[0][0],end = '')
print(c[1][1],end = '')
print(c[2][2])

Solution (Python):


S_list = [input().strip() for _ in range(3)]

print( S_list[0][0] + S_list[1][1] + S_list[2][2] )

Solution (Python):
a = input()
b = input()
c = input()

print(a[0]+b[1]+c[2])

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
s=[ input() for _ in range(3)]

ss=s[0][0]+s[1][1]+s[2][2]
print(ss)

Solution (Python):
a = list(map(str, input()))
b = list(map(str, input()))
c = list(map(str, input()))

print(a[0]+b[1]+c[2], end='')

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
print(s1[0] + s2[1] + s3[2])

Solution (Python):
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])

Solution (Python):
c1 = list(input())
c2 = list(input())
c3 = list(input())
print(c1[0] + c2[1] + c3[2])

Solution (Python):
a=[input() for _ in range(3)]
print(a[0][0]+a[1][1]+a[2][2])

Solution (Python):
A = input()
B = input()
C = input()

print(A[0] + B[1] + C[2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0] + c2[1] + c3[2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
ans = c1[0]+c2[1]+c3[2]
print(ans)

Solution (Python):
import numpy as np

A=np.array([list(input()) for i in range(3)])
for i in range(3):
    print(np.diag(A)[i],end='')

Solution (Python):
a = raw_input()
b = raw_input()
c = raw_input()
print a[0]+b[1]+c[2]

Solution (Python):
a=raw_input()
b=raw_input()
c=raw_input()
print a[0]+b[1]+c[2]

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
c = [list(input()) for i in range(3)]
print(c[0][0] + c[1][1] + c[2][2])

Solution (Python):
t = ""
for n in range(3):
  t += input()[n]
print(t)

Solution (Python):
Strings = [input() for i in range(3)]

output = ''
for n, s in enumerate(Strings):
    output += s[n]
    
print(output)

Solution (Python):
c1 = []
c2 = []
c3 = []

c1 = input()
c2 = input()
c3 = input()

print(c1[0] + c2[1] + c3[2])

Solution (Python):
s1 = input()
s2 = input()
s3 = input()

print(s1[0] + s2[1] + s3[2])

Solution (Python):
print("".join(input()[i] for i in range(3)))

Solution (Python):
c = [input() for i in range(3)]
print(c[0][0]+c[1][1]+c[2][2])

Solution (Python):
ans=""
for i in range(3):
    c=input()
    ans+=c[i]
print(ans)

Solution (Python):
c1,c2,c3 = [input() for _ in range(3)]
print(c1[0] + c2[1] + c3[2])

Solution (Python):
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])

Solution (Python):
def readints():
    return list(map(int, input().split()))






a = input()
b = input()
c = input()

print(a[0], end="")
print(b[1], end="")
print(c[2], end="")

Solution (Python):
s1 = str(input())
s2 = str(input())
s3 = str(input())

print(s1[0] + s2[1] + s3[2])

Solution (Python):
S0=input()
S1=input()
S2=input()

print(S0[0]+S1[1]+S2[2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()

print(c1[0]+c2[1]+c3[2])

Solution (Python):
A = input()
B = input()
C = input()

print(A[0] + B[1] + C[2])

Solution (Python):
a = [ input() for _ in range(3) ] 
ans = a[0][0] + a[1][1] + a[2][2]
print(ans)

Solution (Python):
a = input()
b = input()
c = input()
print(a[0] + b[1] + c[2])

Solution (Python):
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])

Solution (Python):
c = [input() for _ in range(3)]
print(c[0][0] + c[1][1] + c[2][2])

Solution (Python):
c1=input()
c2=input()
c3=input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
a = input()
b = input()
c = input()

print(a[0]+b[1]+c[2])

Solution (Python):
ans = [input()[i] for i in range(3)]
print("".join(ans))

Solution (Python):
c = []
for _ in range(3):
    c.append(input())

print(c[0][0] + c[1][1] + c[2][2])

Solution (Python):
C1 = list(input())
C2 = list(input())
C3 = list(input())
print(C1[0],C2[1],C3[2],sep="")

Solution (Python):
def main():
    grids = [""] * 3
    for i in range(3):
        grids[i] = input()
    answer = ""
    for i in range(3):
        answer = answer + grids[i][i]
    print(answer)


if __name__ == '__main__':
    main()

Solution (Python):
ans = [input()[i] for i in range(3)]
print(''.join(ans))

Solution (Python):
a = input()
b = input()
c = input()

print(a[0] + b[1] + c[2])

Solution (Python):
A = input()
B = input()
C = input()
print(A[0] + B[1] + C[2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0] + c2[1] + c3[2])

Solution (Python):
a=str(input())
b=str(input())
c=str(input())
print(a[0]+b[1]+c[2])

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
print(s1[0]+s2[1]+s3[2])

Solution (Python):
a, b, c = [input() for _ in range(3)]
print(a[0] + b[1] + c[2])

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
c = input()[0]
c += input()[1]
c += input()[2]
print(c)

Solution (Python):
a = input()
b = input()
c = input()
print(a[0] + b[1] + c[2])

Solution (Python):
print(input()[0] + input()[1] + input()[2])

Solution (Python):
a = input().rstrip()
b = input().rstrip()
c = input().rstrip()
print(a[0] + b[1] + c[2])

Solution (Python):
a = []
for i in range(3):
    a.append(list(map(str, input().split())))
print(str(a[0])[2]+str(a[1])[3]+str(a[2])[4])

Solution (Python):
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])

Solution (Python):

A = input()
B = input()
C = input()


Ans = A[0] + B[1] + C[2]
print(Ans)

Solution (Python):
a = str(input())
b = str(input())
c = str(input())
print(a[0] + b[1] + c[2])

Solution (Python):
a = input()
b = input()
c = input()

a_list = [i for i in a]
b_list = [i for i in b]
c_list = [i for i in c]


print(a_list[0]+b_list[1]+c_list[2])

Solution (Python):
a = [input() for i in range(3)]
print(a[0][0]+a[1][1]+a[2][2])

Solution (Python):
A=input()
B=input()
C=input()
print(A[0]+B[1]+C[2])

Solution (Python):
a=input()
b=input()
c=input()

print(a[0] + b[1] + c[2])

Solution (Python):














a = input()
b = input()
c = input()

print(a[0]+b[1]+c[2])

Solution (Python):
l1 = input()
l2 = input()
l3 = input()
print(l1[0]+l2[1]+l3[2])

Solution (Python):
ans = ''
for i in range(3):
  ans += input()[i]
print(ans)

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
print(input()[0], end='')
print(input()[1], end='')
print(input()[2])

Solution (Python):
a=[]
for _ in range(3):
    a.append(list(input()))
print(str(a[0][0])+str(a[1][1])+str(a[2][2]))

Solution (Python):
import numpy as np
C=np.zeros((3,3),dtype=str)
for i in range(3):
  a=list(map(str,input()))
  C[i][0]=a[0]
  C[i][1]=a[1]
  C[i][2]=a[2]
print(C[0][0]+C[1][1]+C[2][2])

Solution (Python):




def main():
    C1 = list(input())
    C2 = list(input())
    C3 = list(input())
    print(C1[0] + C2[1] + C3[2])


if __name__ == "__main__":
    main()

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0]+c2[1]+c3[-1])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0] + c2[1] + c3[2])

Solution (Python):
A = input()
B = input()
C = input()
print(A[0] + B[1] + C[2])

Solution (Python):
row = [input() for i in range(3)]
print(row[0][0]+row[1][1]+row[2][2])

Solution (Python):
a = input()
b = input()
c = input()
s = a[0]+b[1]+c[2]
print(s)

Solution (Python):
a1=input()
a2=input()
a3=input()
print(a1[0]+a2[1]+a3[2])

Solution (Python):
print(str(input())[0], end = "")
print(str(input())[1], end = "")
print(str(input())[2], end = "")

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
print(s1[0]+s2[1]+s3[2])

Solution (Python):
l = [list(input()) for i in range(3)]
print(l[0][0]+l[1][1]+l[2][2])

Solution (Python):
c=[list(input()) for _ in range(3)]


print(c[0][0]+c[1][1]+c[2][2])

Solution (Python):
s=list(input())
t=list(input())
v=list(input())
print(s[0]+t[1]+v[2])

Solution (Python):
s = [input() for i in range(3)]
for i in range(3):
    print(s[i][i],end="")

Solution (Python):
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys
import itertools



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A = [readline().decode('utf8') for _ in range(3)]

print(A[0][0]+A[1][1]+A[2][2])

Solution (Python):
c = [input() for i in range(3)]
print(c[0][0]+c[1][1]+c[2][2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
C1 = list(input())
C2 = list(input())
C3 = list(input())

print('{}{}{}'.format(C1[0],C2[1],C3[2]))

Solution (Python):
board =[input() for i in range(3)]
for i in range(3):
    print(board[i][i],end="")

Solution (Python):
arr = [[0]*3 for i in range(3)]

for i in range(3):
    s = input()
    s = list(s)
    arr[i] = s

print(arr[0][0],arr[1][1],arr[2][2], sep = '')

Solution (Python):
a = []
for i in range(3):
    a.append(list(map(str, input().split())))
print(str(a[0])[2]+str(a[1])[3]+str(a[2])[4])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0] + c2[1] + c3[2])

Solution (Python):
s_1 = input()
s_2 = input()
s_3 = input()
ans = s_1[0] + s_2[1] + s_3[2]
print(ans)

Solution (Python):
A=str(input())
B=str(input())
C=str(input())
print(A[0]+B[1]+C[2])

Solution (Python):
s1=input()
s2=input()
s3=input()
ans=""
ans+=s1[0]+s2[1]+s3[2]
print(ans)

Solution (Python):
n = [input() for _ in range(3)]
print(n[0][0] + n[1][1] + n[2][2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()

print(c1[0]+c2[1]+c3[2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
s1 = input()
s2 = input()
s3 = input()

print("{}{}{}".format(s1[0], s2[1], s3[2]))

Solution (Python):
C = [input() for _ in range(3)]

ans = C[0][0] + C[1][1] + C[2][2]

print(ans)

Solution (Python):
c_1 = list(input())
c_2 = list(input())
c_3 = list(input())

ans = ""
ans += c_1[0] + c_2[1] + c_3[2]

print(ans)

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
a = input()[0]
b = input()[1]
c = input()[2]

print(a+b+c)

Solution (Python):
a=input()
b=input()
c=input()

print(a[0]+b[1]+c[2])

Solution (Python):
a=list(input() for _ in range(3))
print(a[0][0]+a[1][1]+a[2][2])

Solution (Python):
a = input()[0]
b = input()[1]
c = input()[2]
print(a+b+c)

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
x = s1[0]+s2[1]+s3[2]
print(x)

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
def main():
    from sys import stdin, setrecursionlimit
    
    
    
    
    
    r = [stdin.readline() for i in range(3)]
    
    print(r[0][0]+r[1][1]+r[2][2])
    
    
    
    

if __name__ == '__main__':
    main()

Solution (Python):


import numpy as np

for i in range(3):
    s =input()
    print(s[i],end="")

Solution (Python):
c1 = input()
c2 = input()
c3 = input()

print(c1[0], c2[1], c3[2], sep='')

Solution (Python):
ans = ""
for i in range(3):
    c = input()
    ans += c[i]

print(ans)

Solution (Python):
a=input()[0]
b=input()[1]
c=input()[2]
print(a+b+c)

Solution (Python):
a = list(input())
b = list(input())
c = list(input())

print('{}{}{}'.format(a[0],b[1],c[2]))

Solution (Python):
c1=input()
c2=input()
c3=input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
ans=''
for i in range(3):
  ans += (input())[i]
print(ans)

Solution (Python):
print(input()[0] + input()[1] + input()[2])

Solution (Python):
a = input()
b = input()
c = input()

print(a[0]+b[1]+c[2])

Solution (Python):
a=input()

b=input()

c=input()

print(a[0]+b[1]+c[2])

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
print(s1[0] + s2[1] + s3[2])

Solution (Python):
word1 = input()
word2 = input()
word3 = input()

print(word1[0]+word2[1]+word3[2])

Solution (Python):
for i in range(3):
  print(input()[i], end='')

Solution (Python):
c = [[0] * 3 for i in range(3)]
for i in range(3):
    c[i] = input()
print(c[0][0] + c[1][1] + c[2][2])

Solution (Python):
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def my_round(a,dig=0):
    p = 10 ** dig
    return (a * p * 2 + 1) // 2 / p

def gcd(a,b): 
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): 
    return a/gcd(a,b)*b

def divisors(a): 
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): 
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): 
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): 
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

def main():
    cout = []
    for i in range(3):
        x = input()
        cout.append(x[i])
    print(''.join(cout))
    return

if __name__=='__main__':
    main()

Solution (Python):
nes = ["0"] * 3
for i in range(3) :
    nes[i] = list(input())
print(nes[0][0]+nes[1][1]+nes[2][2])

Solution (Python):
ca = list(input())
cb = list(input())
cc = list(input())

print(ca[0] + cb[1] + cc[2])

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
print(s1[0] + s2[1] + s3[2])

Solution (Python):
a,b,c=input()
d,e,f=input()
g,h,i=input()
print(a+e+i)

Solution (Python):
a = input()
b = input()
c = input()

print(a[0]+b[1]+c[2])

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
l = list()
for i in range(3):
    l.append(input())
print(l[0][0] + l[1][1] + l[2][2])

Solution (Python):
str1 = input()
str2 = input()
str3 = input()

print(str1[0]+str2[1]+str3[2])

Solution (Python):
c=[input() for i in range(3)]
for i in range(3):
  print(c[i][i],end='')

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
for i in range(3):
    print(input()[i], end="")

Solution (Python):
c = [input() for _ in range(3)]
res = c[0][0] + c[1][1] + c[2][2]
print(res)

Solution (Python):
import sys
input = sys.stdin.readline
c=[input().strip() for _ in range(3)]
ans=""
for i in range(3):
    ans+=c[i][i]
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
c = [list(input().strip()) for _ in range(3)]
ans = ""
for i in range(3):
    ans += c[i][i]
print(ans)

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
print(s1[0]+s2[1]+s3[2])

Solution (Python):
li1 = list(input())
li2 = list(input())
li3 = list(input())
print(li1[0] + li2[1] + li3[2])

Solution (Python):

a = input()[0]
b = input()[1]
c = input()[2]
print(a+b+c)

Solution (Python):
import sys
input = sys.stdin.readline
C = []
for _ in range(3):
    C.append(list(input()))
print(C[0][0] + C[1][1] + C[2][2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()

print(c1[0] + c2[1] + c3[2])

Solution (Python):
c=[input() for _ in range(3)]
print(c[0][0]+c[1][1]+c[2][2])

Solution (Python):
c1=input()
c2=input()
c3=input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
s = input()
t = input()
u = input()
print(s[0] + t[1] + u[2])

Solution (Python):
A = list(input())
B = list(input())
C = list(input())

print(A[0]+B[1]+C[2])

Solution (Python):
c = input()
c_ = input()
c__ = input()

print(c[0]+ c_[1] + c__[2])

Solution (Python):
a = list(input())
b = list(input())
c = list(input())
d =[a[0],b[1],c[2]]
print(''.join(d))

Solution (Python):
s = [list(input()) for i in range(3)]
s
print(s[0][0]+s[1][1]+s[2][2])

Solution (Python):
c = [list(str(input())) for _ in range(3)]

for i in range(3):
    print(c[i][i],end='')

Solution (Python):
for i in range(3):
    print(input()[i], end='')
print()

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()
print(c1[0]+c2[1]+c3[2])

Solution (Python):
c = []
for i in range(3):
   c.append(input())

print(c[0][0] + c[1][1] + c[2][2])

Solution (Python):
l=[]
for i in range(3):
  l.append(input()[i])
print(l[0]+l[1]+l[2])

Solution (Python):
c = [input() for i in range(3)]

for i in range(3):
    print(c[i][i],end="")
else:
    print("")

Solution (Python):
a = input()
b = input()
c = input()

print(a[0] + b[1] + c[2])

Solution (Python):
c1 = input()
c2 = input()
c3 = input()

print(c1[0]+c2[1]+c3[2])

Solution (Python):
a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
print(s1[0]+s2[1]+s3[2])

Solution (Python):
c1 = input()[0]
c2 = input()[1]
c3 = input()[2]
print(c1+c2+c3)

Solution (Python):
print(input()[0]+input()[1]+input()[2])

Solution (Python):
import sys

s = sys.stdin.read().split()

def main():
    t = ''
    for i in range(3):
        t += s[i][i]
    return t

if __name__ == '__main__':
    ans = main()
    print(ans)

Solution (Python):
import sys

s = sys.stdin.read().split()

def main():
    t = ''
    for i in range(3):
        t += s[i][i]
    return t

if __name__ == '__main__':
    ans = main()
    print(ans)

Solution (Python):
s1 = input()
s2 = input()
s3 = input()

print(s1[0] + s2[1] + s3[2])

Solution (Python):
s = [input() for i in range(3)]
print(s[0][0] + s[1][1] + s[2][2])

Solution (Python):


ans=("")
for i in range(3):
    c=input()
    ans+=c[i]
print(ans)

"""
ant
obe
rec

abc

edu
cat
ion

ean
"""

Solution (Python):
s = [input() for i in range(3)]
print(s[0][0]+s[1][1]+s[2][2])