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):
a = list(input())
b = list(input())
c = list(input())

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

Solution (Python):
c = []
for x in range(3):
    c.append(input())
ans = ''
for x in range(3):
    ans += c[x][x]
print(ans)

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

Solution (Python):
def main():
    c = []
    t = ""
    for i in range(3):
        s = input()
        t += s[i]
    return t


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

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

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

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

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

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

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

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

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

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
print(''.join([s1[0], s2[1], s3[2]]))

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

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

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

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

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=[]
for i in range(3):
    c=str(input())
    A.append(c)
ans=A[0][0]+A[1][1]+A[2][2]
print(ans)

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

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


if __name__ == "__main__":
    test()

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() for i in range(3)];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):
out = ''
for i in range(3):
  out += input()[i]

print(out)

Solution (Python):
print("".join([input()[0],input()[1],input()[2]]))

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

print("{}{}{}".format(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()[0]
e = input()[1]
i = input()[2]
print(a+e+i)

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

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

Solution (Python):

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

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

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

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

Solution (Python):
C=[input() for c in range(3)]
C1=[]
C2=[]
C3=[]
ANS=' '
for c in C[0]:
    C1.append(c)
for c in C[1]:
    C2.append(c)
for c in C[2]:
    C3.append(c)
    
ANS=C[0][0]+C[1][1]+C[2][2]

print(ANS)

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):
a=input()[0]
b=input()[1]
c=input()[2]
print(a+b+c)

Solution (Python):
print(input()[0]+input()[1]+input()[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):
C = open(0).read().split()
for i in range(len(C)):
  print(C[i][i],end="")
print("",end="\n")

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

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

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

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

Solution (Python):
print(open(0).read()[::5])

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

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

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

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

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

Solution (Python):
s=open(0).read().split()
print(s[0][0]+s[1][1]+s[2][2])

Solution (Python):

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

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

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

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

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

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

print(s1[0] + s2[1] + s3[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(s1[0]+s2[1]+s3[2])

Solution (Python):
i = 0;
result = ""
while i < 3:
    li =list(input())
    result += li[i];
    i+=1

print(result)

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

Solution (Python):

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

Solution (Python):


li =  [list(y) for y in [input() for x in range(3)]]
print(li[0][0]+li[1][1]+li[2][2])

Solution (Python):
x = list(input())
y = list(input())
z = list(input())

print(x[0]+y[1]+z[2])

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

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

Solution (Python):
C1 = input()
C2 = input()
C3 = input()
print(C1[0]+C2[1]+C3[2])

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

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):
import sys
input = sys.stdin.readline

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

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

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

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

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

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

Solution (Python):

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

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

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

Solution (Python):
a=input()
b=input()
c=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):
c = input()
c2 = input()
c3 = input()
print(c[0]+c2[1]+c3[2])

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

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

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

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

Solution (Python):
i,j,k=open(0).read().split()
print(i[0]+j[1]+k[2])

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

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

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

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

Solution (Python):
f = list(input())
s = list(input())
t = list(input())

a = [f[i: i+1] for i in range(0, len(f), 1)]
b = [s[i: i+1] for i in range(0, len(s), 1)]
c = [t[i: i+1] for i in range(0, len(t), 1)]
d = ''.join(a[0] + b[1] + c[2])
print(d)

Solution (Python):
f = list(input())
s = list(input())
t = list(input())

a = [f[i: i+1] for i in range(0, len(f), 1)]
b = [s[i: i+1] for i in range(0, len(s), 1)]
c = [t[i: i+1] for i in range(0, len(t), 1)]
d = ''.join(a[0] + b[1] + c[2])
print(d)

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

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

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

Solution (Python):
hako = []
kotae = []
for _ in range(3):
  hako.append(list(input()))
for h in range(len(hako)):
  kotae.append(hako[h][h])
print("".join(kotae))

Solution (Python):
strs = [list(input()) for _ in range(3)]
ans = ''
for i in range(3):
  for j in range(3):
    if i == j:
      ans += strs[i][j]
print(ans)

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

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

Solution (Python):
c0 = input()
c1 = input()
c2 = input()
print(c0[0]+c1[1]+c2[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()
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() 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):


row1 = input()
row2 = input()
row3 = input()

print(row1[0] + row2[1] + row3[2])

Solution (Python):
a = list(input())
b = list(input())
c = list(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):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math





 
def main():
    a = input()
    b = input()
    c = input()
    
    print(a[0] + b[1] + c[2])
    
	
if __name__ == "__main__":
	main()

Solution (Python):
c1 = str(input())
c2 = str(input())
c3 = str(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])

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

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

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

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

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

Solution (Python):

import sys


def solve(c: "List[str]"):
    print(c[0][0] + c[1][1] + c[2][2])
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    c = [next(tokens) for _ in range(3)]  
    solve(c)


if __name__ == '__main__':
    main()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    s = SR(3)
    for i in range(3):
        print(s[i][i], end="")
    print()
    return


def B():
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    A()

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):
s1 = input()
s2 = input()
s3 = input()

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

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

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):
lst = []
for i in range(0, 3):
	lst.append(input())
print(lst[0][0]+lst[1][1]+lst[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):
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):
L = [input() for l in range(3)]

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

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

Solution (Python):

s1 = input()
s2 = input()
s3 = input()

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

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

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

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

Solution (Python):
zero = input()[0]
one = input()[1]
two = input()[2]

print(zero + one + two)

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

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

Solution (Python):

S1 = input()
S2 = input()
S3 = input()
ans =S1[0]+S2[1]+S3[2]
print(ans)

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

Solution (Python):
C1,C2,C3 = input()
C4,C5,C6 = input()
C7,C8,C9 = input()
print(''.join([C1,C5,C9]))

Solution (Python):

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

ans = a[0]+b[1]+c[2]

print (ans)

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

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    c1 = input()
    c2 = input()
    c3 = input()

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

Solution (Python):
c_1 = input()
c_2 = input()
c_3 = input()
print(c_1[0] + c_2[1] + c_3[2])

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):
s = [input() for i in range(3)]
print(s[0][0], s[1][1], s[2][2], sep="")

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()


C = [s(), s(), s()]
print(C[0][0] + C[1][1] + C[2][2])

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

Solution (Python):
def resolve():
	c=list(map(list,[input() for __ in range(3)]))
	s=''
	for i in range(3):
		s+=c[i][i]
	print(s)

resolve()

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

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

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

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

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):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    s1 = input()
    s2 = input()
    s3 = input()
    print(s1[0]+s2[1]+s3[2])
    
if __name__ == '__main__':
    main()

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

print(a+b+c)

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

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

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

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

Solution (Python):
def abc():
    r1 = input()
    r2 = input()
    r3 = input()
    print(r1[0] + r2[1] + r3[2])


abc()

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

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

Solution (Python):

import sys


def solve(c: "List[str]"):
    for i,s in enumerate(c):
        print(s[i],end="")
    print("")



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    c = [ next(tokens) for _ in range(3) ]  
    solve(c)

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):


s1 = input()
s2 = input()
s3 = input()

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

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

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

Solution (Python):
s1,s2,s3 = input(),input(),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):
li = [input() for _ in range(3)]
print(li[0][0]+li[1][1]+li[2][2])

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

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

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

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

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

C=[]
C=B[0]+B[4]+B[8]
print(C)

Solution (Python):
s  = input()
t  = input()
u = input()

slice1 = s[0:1]
slice2 = t[1:2]
slice3 = u[2:3]

ans = slice1 + slice2 + slice3

print(ans)

Solution (Python):
s  = input()
t  = input()
u = input()

slice1 = s[0:1]
slice2 = t[1:2]
slice3 = u[2:3]

ans = slice1 + slice2 + slice3

print(ans)

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

Solution (Python):
ans=[]
for i in range(3):
    s=str(input())
    ans.append(s[i])
    
answer="".join(ans)

print(answer)

Solution (Python):
a = input()
b = input()
c = 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):
S1=input()
S2=input()
S3=input()
print(S1[0]+S2[1]+S3[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()
B = input()
C = input()
print(A[0] + B[1] + C[2])

Solution (Python):
c = [list(input()) for i in range(3)]
s = ""
for j in range(3):
  s += str(c[j][j])
print(s)

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

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

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

ls = [a[0],b[1],c[2]]
print(''.join(ls))

Solution (Python):
if __name__ == '__main__':
    lst = [list(input()) for i in range(3)]
    str = [lst[0][0], lst[1][1], lst[2][2]]
    print("".join(str))

Solution (Python):
ans = ""

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

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

ans = a[0]+b[1]+c[2]

print(ans)

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

print (A+B+C)

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

Solution (Python):
c1_list = [i for i in input()]
c2_list = [i for i in input()]
c3_list = [i for i in input()]
print(c1_list[0] + c2_list[1] + c3_list[2])

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

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

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=""
for i in range(3):
  l=input().split()
  a=a+l[0][i]
print(a)

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

Solution (Python):
lst = []
for i in range(0, 3):
	lst.append(raw_input())
print lst[0][0]+lst[1][1]+lst[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):
a = input()
b = input()
c = input()
str_list = [a, b, c]
result = ""

for i in range(3):
    result += str_list[i][i]

print(result)

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

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

Solution (Python):

import sys


def solve(c: "List[str]"):
    ret = c[0][0] + c[1][1] + c[2][2]
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    c = [ next(tokens) for _ in range(3) ]  
    solve(c)

if __name__ == '__main__':
    main()

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 = input()
C2 = input()
C3 = input()

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

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):
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):
S = [ list(input()) for _ in range(3)]
print(S[0][0]+S[1][1]+S[2][2])

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

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

Solution (Python):


from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance


class UnionFind:

    def __init__(self, n):
        self.parent = [i for i in range(n)]

    def root(self, i):
        if self.parent[i] == i:
            return i
        self.parent[i] = self.root(self.parent[i])
        return self.parent[i]

    def unite(self, i, j):
        rooti = self.root(i)
        rootj = self.root(j)
        if rooti == rootj:
            return
        if rooti < rootj:
            self.parent[rootj] = rooti
        else:
            self.parent[rooti] = rootj

    def same(self, i, j):
        return self.root(i) == self.root(j)





def main():
    c1 = input()
    c2 = input()
    c3 = input()
    print('%s%s%s' % (c1[0], c2[1], c3[2]))


if __name__ == '__main__':
    main()

Solution (Python):
c = [input() for i in range(3)]
list = []
for i in range(3):
    d = c[i]
    e = d[i]
    list.append(e)
for j in list:
    print(j , end = "")

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

Solution (Python):


def main():
    data = [list(input()) for i in range(3)]
    print(data[0][0] + data[1][1] + data[2][2])


if __name__ == '__main__':
    main()

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:1] + s2[1:2] + s3[2:3])

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

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

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

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

Solution (Python):

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

print(''.join(s))

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

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

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

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

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

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

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

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

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

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=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):
i = 0
a = []
while i < 3:
  a.append(input())
  i += 1

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):
import sys


def input():
    return sys.stdin.readline()[:-1]








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

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

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

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):
S1=input()
S2=input()
S3=input()
print(S1[0]+S2[1]+S3[2])

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

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

Solution (Python):
A = ""
for i in range(3):
    row = (list(input()))
    A += row[i]
print(A)

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

Solution (Python):
str = ''

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

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

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

solve()

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() for _ in range(3)]
print(S[0][0]+S[1][1]+S[2][2])

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

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

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

Solution (Python):
print(open(0).read()[::5])

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

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

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

print(ans)