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

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

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

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

Solution (Python):
import sys
for i in range(3):
  a=input()
  sys.stdout.write(a[i])

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

print(s1.pop(0)+s2.pop(1)+s3.pop(2))

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

s2.remove(s2[0])

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

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


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

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

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

Solution (Python):
A = list(input())
B = list(input())
C = list(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):
l = ""
for i in range(3):
  l += input()[i]
print(l)

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

a=list(a)
b=list(b)
c=list(c)

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

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

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

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

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

print(word)

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

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

Solution (Python):
s1=input()
s2=input()
s3=input()
print("{}{}{}".format(s1[0],s2[1],s3[2]))

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

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

Solution (Python):
p = input()
q = input()
r = input()

print(p[0] + q[1] + r[2])

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

Solution (Python):
d = [list(input()) for i in range(3)]
print('{}{}{}'.format(d[0][0], d[1][1], d[2][2]))

Solution (Python):
A = list(input())
B = list(input())
C = list(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):
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 = [list(input()) for i in range(3)]

print("{}{}{}".format(a[0][0],a[1][1],a[2][2]))

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

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

Solution (Python):
c = [[]] * 3
for i in range(3):
	c[i] = list(raw_input())
print "%s%s%s" % (c[0][0], c[1][1], c[2][2])

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

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

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

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

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

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

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

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

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

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

A = [0]*3
ca = 0
cb = 0
cc = 0
for d in a:
    ca +=1
    if(ca == 1):
        A[0] = d

for e in b:
    cb +=1
    if(cb == 2):
        A[1] = e
for f in c:
    cc +=1
    if(cc == 3):
        A[2] = f 

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

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

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

an = [c1[0], c2[1], c3[2]]
a = ','.join(an)
ans = a.replace(',', '')
print(ans)

Solution (Python):


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

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

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

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

Solution (Python):
C = [list(input()) for _ in range(3)]
print('{}{}{}'.format(C[0][0], C[1][1], C[2][2]))

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

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

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

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

Solution (Python):
ans =""
index=0
while index < 3:
    listS = list(input())
    ans+=listS[index]
    index+=1

print(ans)

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

Solution (Python):
c1, c2, c3 = map(list,map(str, [input() for i in range(3)]))
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])

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

l = []

l.append(c1[0])
l.append(c2[1])
l.append(c3[2])

print(''.join(l))

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

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

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

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

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

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

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

Solution (Python):
p = input()
q = input()
r = input()
print(p[0]+q[1]+r[2])

Solution (Python):
C1=str(input()[0]);
C1+=str(input()[1]);
C1+=str(input()[2]);
print(C1)

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

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

ans = C1[0] + C2[1] + C3[2]

print(ans)

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

print(ans)

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

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

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

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):
a,b,c=[input()for i in[0]*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):
i = []
c = 0

while 3 > c:
    i.append(input().strip())
    c += 1

print("".join([c[i] for i, c in enumerate(i)]))

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

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

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

Solution (Python):
s = []
s.append(input())
s.append(input())
s.append(input())

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

Solution (Python):
s = ''
for i in range(0, 3):
	s = s + raw_input()[i]

print s

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

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

l = []
cnt = 0;
for cj in c:
    l.append(cj[cnt])
    cnt += 1

print(''.join(l))

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

print(a + b + c)

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

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

print(ans)

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

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

Solution (Python):

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

Solution (Python):
a = ""
for i in range(3):
    a += input()
    
c = list(a)
print(c[0]+c[4]+c[8])

Solution (Python):
a = list(map(str, input()))
b = list(map(str, input()))
c = list(map(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()
d, e, f = input()
g, h, i = input()
print(a + e + i)

Solution (Python):

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

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

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

c0 = input()
c1 = input()
c2 = input()

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

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

print(ans)

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

Solution (Python):


import numpy as np

c = []
for i in range(3):
    c.append(list(str(input())))

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

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

Solution (Python):


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def main():
    C = []
    for i in range(3):
        C.append(input())
    print(C[0][0] + C[1][1] + C[2][2])

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
row = 3
column = 3
c=[]

for i in range(1, (row+1)):
    c.append(input())

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

Solution (Python):
L1=input()
L2=input()
L3=input()

print(L1[0]+L2[1]+L3[2])

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

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

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

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

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

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

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

print("".join([c[i][i] for i in range(3)]))

Solution (Python):
nums1 = input()
nums2 = input()
nums3 = input()


print(nums1[0]+nums2[1]+nums3[2])

Solution (Python):
c = []
for _ in range(3):
    c.append(input())
    
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):
c = list(list(input()) for _ in range(3))
ans = ''.join(list(c[i][i] for i in range(3)))
print(ans)

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

Solution (Python):


def main():
    s = []
    for i in range(3):
        s.append(input())
    for i in range(3):
        print(s[i][i], end = '')
    print('\n')

if __name__ == '__main__':
    main()

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

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

Solution (Python):
i = input()
j = input()
k = input()
print(i[0]+j[1]+k[2])

Solution (Python):
A = list(input())
B = list(input())
C = list(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):
print raw_input()[0] + raw_input()[1] + raw_input()[2]

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

Solution (Python):

s=list(input())
s2=list(input())
s3=list(input())

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

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

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

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

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

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

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

Solution (Python):

def main():
    a = input()
    b = input()
    c = input()


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

if __name__ == "__main__":
        main()

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(list(input()))
seq = ""
for i in range(3):
	seq += C[i][i]
print(seq)

Solution (Python):
A=input()
B=input()
C=input()
print(A[0]+B[1]+C[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 = []
for i in range(3):
  a.append(input()[i])

print("".join(a))

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

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

Solution (Python):
i1 = input()
i2 = input()
i3 = input()
print(i1[0]+i2[1]+i3[2])

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

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

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

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

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

print(t)

Solution (Python):
def main():
    a, _, __ = input()
    _, b, __ = input()
    _, __, c = input()

    print(a+b+c)

main()

Solution (Python):
r1 = input()
r2 = input()
r3 = input()
print("{}{}{}".format(r1[0], r2[1], r3[2]))

Solution (Python):
c1 = str(input())
c2 = str(input())
c3 = str(input())
res = ""

res += c1[0] + c2[1] + c3[2]

print(res)

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

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

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

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

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

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

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

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

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):
print("".join(input()[i]for i in [0,1,2]))

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

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

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):
X = []
for i in range(3):
  s = list(str(input()))
  X.append(s)

print("{}{}{}".format(X[0][0],X[1][1],X[2][2]))

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

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

Solution (Python):

"""
Created on Wed Jun 13 17:57:26 2018

@author: Yuya
"""

N = 3
src = [input() for i in range(N)]

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

print(ans)

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

Solution (Python):
data = [[i for i in input().split()] for i in range(3)]
num = 0
answer = ""
for i in data:
	for j in i:
		answer+=j[num]
		num+=1

print(answer)

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

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

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

Solution (Python):
import numpy as np

r1 = list(input())
r2 = list(input())
r3 = list(input())

mt = np.array([r1, r2, r3])
ans = ''.join(np.diag(mt))
print(ans)

Solution (Python):
line1=input()
line2=input()
line3=input()

print(line1[0]+line2[1]+line3[2])

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

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

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

Solution (Python):

A = [input() for i in range(3)]
B =A[0]+A[1]+A[2]    
B
print('{}'.format(B[0]+B[4]+B[8]))

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

print(a + b + c)

Solution (Python):
l1 = input()
l2 = input()
l3 = input()

list_c = list(l1+l2+l3)

print(list_c[0]+list_c[4]+list_c[8])

Solution (Python):



C1 =  input()
C2 =  input()
C3 =  input()

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

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

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

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

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

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

print("".join([c[i][i] for i in range(3)]))

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

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

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

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

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

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

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

Solution (Python):
print(input()[0]+input()[1]+input()[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:1]+B[1:2]+C[2:3])

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

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



str1 = input()
str2 = input()
str3 = input()

print(str1[0] + str2[1] + str3[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):
x=""
r=range(3)
for i in r:x+=list(input())[i]
print(x)

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

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

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

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

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

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

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

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

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

print(c)

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

Solution (Python):
line_1 = input()
line_2 = input()
line_3 = input()
print(line_1[0] + line_2[1] + line_3[2])

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

Solution (Python):

cs = [input() for _ in range(3)]
print("{}{}{}".format(cs[0][0], cs[1][1], cs[2][2]))

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

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

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

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

words = [input() for i in range(3)]

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

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

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

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

Solution (Python):
src=[input() for _ in range(3)]
c=[[k[i] for i in range(3)] for k in src]
dst=[c[i][i] for i in range(3)]
print(''.join(dst))

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

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

Solution (Python):
c = []

for i in range(3):
    c.append(input())
    
print("{0}{1}{2}".format(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):
A = input()
B = input()
C = input()
print(A[0]+B[1]+C[2])

Solution (Python):
from sys import stdin


def main():
    c1 = stdin.readline()[0]
    c2 = stdin.readline()[1]
    c3 = stdin.readline()[2]
    print(c1 + c2 + c3)


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):

total_stri =[] 
for  i in range(3):
    stri = input()
    total_stri.append(stri)
diagonal = total_stri[0][0] + total_stri[1][1] + total_stri[2][2]
print(diagonal)

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

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

moji=""
for i in range(3):
    moji += sanmoji[i]
print(moji)

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

Solution (Python):
one = str(input())
two = str(input())
three = str(input())
print(one[0]+two[1]+three[2])

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

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

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

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

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

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

answer = ""
for i in range(3):
    answer += a[i][i]
print(answer)

Solution (Python):
f=lambda i:input()[i]
print(f(0)+f(1)+f(2))

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

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

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"


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


if __name__ == '__main__':
    main()

Solution (Python):
up = input().split()
mid = input().split()
down = input().split()

print(up[0][0], end='')
print(mid[0][1], end='')
print(down[0][2])

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

Solution (Python):
ans = []
line = input()
line2 = input()
line3 = input()
ans.append(line[0])
ans.append(line2[1])
ans.append(line3[2])
ans="".join(ans)
print(ans)

Solution (Python):
 
C_0=list(input())
C_1=list(input())
C_2=list(input())



print(C_0[0]+C_1[1]+C_2[2])

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

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

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

Solution (Python):


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

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

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

Solution (Python):


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

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

Solution (Python):
C11,C12,C13 = input()
C21,C22,C23 = input()
C31,C32,C33 = input()


print(C11+C22+C33)

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

Solution (Python):
import sys
import io


def run(input: io.TextIOBase, output: io.TextIOBase):
    x0 = input.readline()
    x1 = input.readline()
    x2 = input.readline()
    output.write(x0[0] + x1[1] + x2[2] + '\n')


if __name__ == '__main__':
    run(sys.stdin, sys.stdout)

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

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

Solution (Python):

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

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

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

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

Solution (Python):
import math
import numpy as np
from operator import mul

C1 = input()
C2 = input()
C3 = input()

c11 = C1[0]
c22 = C2[1]
c33 = C3[2]

print(c11 + c22 + c33)

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

Solution (Python):
print(''.join([k[j] for (j, k) in enumerate([input() for i in range(3)])]))

Solution (Python):
c = [list(input()) for i in range(3)]
print('{}{}{}'.format(c[0][0], c[1][1], c[2][2]))

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

print("{}{}{}".format(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):
print("{}{}{}".format(input()[0], input()[1], input()[2]))

Solution (Python):
l1 = input()
l2 = input()
l3 = input()
print(l1[0] + l2[1] + l3[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):



import math
import re
import sys


def getinputdata():

    
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result




arr_data = getinputdata()

s1 = arr_data[0][0][0]
s2 = arr_data[1][0][1]
s3 = arr_data[2][0][2]

print(s1+s2+s3)

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

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

Solution (Python):
row1 = input()[0]
row2 = input()[1]
row3 = input()[2]

print(row1 + row2 + row3)

Solution (Python):
row1 = input()[0]
row2 = input()[1]
row3 = input()[2]

print(row1 + row2 + row3)

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

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