import sys

import numpy as np



stdin = sys.stdin

 

ri = lambda: int(rs())

rl = lambda: list(map(int, stdin.readline().split()))

rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces



C = [rs() for _ in range(3)]

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

print(answer)

# coding: utf-8

import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



C = [sr() for _ in range(3)]

answer = ''

for i in range(3):

    answer += C[i][i]



print(answer)

import sys
import numpy as np

stdin = sys.stdin
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces
C = [rs() for _ in range(3)]
answer = C[0][0] + C[1][1] + C[2][2]
print(answer)

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
C = [sr() for _ in range(3)]
answer = ""
for i in range(3):
    answer += C[i][i]
print(answer)

+# coding: utf-8 -import numpy as np -stdin = sys.stdin -ri = lambda: int(rs()) -rl = lambda: list(map(int, stdin.readline().split())) -rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces -C = [rs() for _ in range(3)] -answer = C[0][0] + C[1][1] + C[2][2] +sr = lambda: sys.stdin.readline().rstrip() +ir = lambda: int(sr()) +lr = lambda: list(map(int, sr().split())) +C = [sr() for _ in range(3)] +answer = "" +for i in range(3): +    answer += C[i][i]