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=input()
b=input()
c=input()
print('{}{}{}'.format(a[0],b[1],c[2]))

Solution (Python):


l1 = input()
l2 = input()
l3 = input()

s = l1[0] + l2[1] + l3[2]
print(s)

Solution (Python):


l1 = input()
l2 = input()
l3 = input()

s = l1[0] + l2[1] + l3[2]
print(s)

Solution (Python):


l1 = input()
l2 = input()
l3 = input()

s = l1[0] + l2[1] + l3[2]
print(s)

Solution (Python):

arg = list(map(list, [input() for i in range(3)]))
print('{}{}{}'.format(arg[0][0], arg[1][1], arg[2][2]))

Solution (Python):
idx = 0
c = []
while True:
    try:
        string = input()
        c.append(string[idx])
        idx += 1
    except:
        print(''.join(c))
        break

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

Solution (Python):
ips = []
ips.append(input())
while True:
    try:
        ips.append(input())
    except (EOFError):
        break
abc = ips[0][0]+ips[1][1]+ips[2][2]
print(abc)

Solution (Python):


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

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

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

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

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

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

print(''.join([l[0][:1], l[1][1:2], l[2][2:3]]))

Solution (Python):
class Atcoder:


    def Contest0901(self):
        lines = []
        for i in range(3):
            line = input()
            if line:
                lines.append(line)
            else:
                break
        return lines[0][0] + lines[1][1] + lines[2][2]


if __name__ == '__main__':
    atcoder = Atcoder()
    output = atcoder.Contest0901()
    print(output)

Solution (Python):



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

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

Solution (Python):



import sys

raw1 = input()
raw2 = input()
raw3 = input()

txt = raw1[0] + raw2[1] + raw3[2]

print(txt)

Solution (Python):
eh = ""
for i in xrange(3):
  row = raw_input().strip()
  eh += row[i]
print eh

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

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

Solution (Python):




a, b, c = list(input())
d, e, f = list(input())
g, h, i = list(input())

print('%s%s%s' % (a, e, i))

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

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

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

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

Solution (Python):


c=[]
for i in xrange(3):
 c.append(raw_input())
print c[0][0]+c[1][1]+c[2][2]

Solution (Python):

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


print("{}".format(a[0]+b[1]+c[2]))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):

n1 = input()
n2 = input()
n3 = input()
print("{}{}{}".format(n1[0], n2[1], n3[2]))

Solution (Python):
s = ''

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

print(s)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a = [S() for _ in range(3)]
    r = ''.join([a[i][i] for i in range(3)])

    return r


print(main())

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

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

Solution (Python):

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


a1 = a[0]
b2 = b[1]
c3 = c[2]


print(a1+b2+c3)

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

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

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

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

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

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

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


solve()

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

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

Solution (Python):
first = list(input())
second = list(input())
third = list(input())
print(first[0] + second[1] + third[2])

Solution (Python):

if __name__ == "__main__":
    length_ = 3
    c = [ list(input()) for _ in range(length_) ]
    print(c[0][0]+c[1][1]+c[2][2])

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

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

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(list(input()))

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

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

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

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

print("{}{}{}".format(c1[0],c2[1],c3[2]))

Solution (Python):
S1=input()
S2=input()
S3=input()
print(S1[0]+S2[1]+S3[2])

Solution (Python):
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[-1])

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

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

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


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

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

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

Solution (Python):

"""
A - Diagonal String
https://beta.atcoder.jp/contests/abc090/tasks/abc090_a

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    data = []
    for _ in range(3):
        data.append(input().strip())

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


if __name__ == '__main__':
    main(sys.argv[1:])

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

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

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

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

Solution (Python):
a = 0
ans = ""
for i in range(3):
    li = input()
    ans += li[i]
    i += 1

print(ans)

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

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

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

print('%s%s%s' %(A,B,C))

Solution (Python):
def main():
    C = tuple(input() for _ in [0] * 3)

    for i, s in enumerate(C):
        print(s[i], end='')
    print()

main()

Solution (Python):


def solve(ss):
    ans = ss[0][0] + ss[1][1] + ss[2][2]
    return ans

def main():
    ss = []
    for _ in range(3):
        ss += [input()]
    print(solve(ss))


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

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

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

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

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

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

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

Solution (Python):


s1, s2, s3 = [str(input()) for i in range(3)]
print(s1[0] + s2[1] + s3[2])

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

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

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

Solution (Python):
A,B,C=[[str(i) for i in input().split()] for i in range(3)]
print(A[0][0],end="")
print(B[0][1],end="")
print(C[0][2],end="")

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()
for i in range(0,3):
    a +=  list(raw_input())[i]
print a

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

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

Solution (Python):
saisyo = []
a = input()
saisyo.append(a)
N = len(a)

for i in range(N - 1):
    saisyo.append(input())

output = []
for i,x in enumerate(saisyo):
    output.append(x[i])

print("".join(output))

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

c1_list = list(c1)
c2_list = list(c2)
c3_list = list(c3)

c = c1_list[0] + c2_list[1]+ c3_list[2]

print(c)

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

Solution (Python):
import sys

i = 0
for l in sys.stdin:
    print(l[i], end='')
    i += 1

print('')

Solution (Python):
inp = input()
c11 = inp[0:1]
inp = input()
c22 = inp[1:2]
inp = input()
c33 = inp[2:3]

print(c11 + c22 + c33)

Solution (Python):

def main():
    a1 = input()[0]
    a2 = input()[1]
    a3 = input()[2]

    print (a1+a2+a3)


if __name__ == "__main__":
    
    
    main()

Solution (Python):
a=input()
one_list=list(a)
b=input()
two_list=list(b)
c=input()
three_list=list(c)
print('{0}{1}{2}'.format(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):
a = ""
for i in range(3):
  a += input()[i]

print(a)

Solution (Python):
if __name__ == "__main__":
    A1 = input()
    A2 = input()
    A3 = input()
    print(A1[0]+A2[1]+A3[2])

Solution (Python):
A = list(input())
B = list(input())
C = list(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):


s1 = list(input().split())
s2 = input().split()
s3 = input().split()

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

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

print(input_num)

Solution (Python):
if __name__ == '__main__':
    n = 3
    lines = [input() for _ in range(n)]
    diag = [line[i] for i, line in enumerate(lines)]
    print("".join(diag))

Solution (Python):
L = list(input())
M = list(input())
N = list(input())

print('{}{}{}'.format(L[0], M[1], N[2]))

Solution (Python):
a = input()
x = [a[i:i+1] for i in range(len(a))]
b = input()
y = [b[i:i+1] for i in range(len(b))]
c = input()
z = [c[i:i+1] for i in range(len(c))]
ans = x[0]+y[1]+z[2]
print(ans)

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

print(output)

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

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

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

print('{}{}{}'.format(C[0][0],C[1][1],C[2][2]))

Solution (Python):
u = list(input())
m = list(input())
d = list(input())

print(u[0], end='')
print(m[1], end='')
print(d[2])

Solution (Python):


if __name__ == "__main__":
    l1 = input()
    l2 = input()
    l3 = input()
    print("{}{}{}".format(l1[0], l2[1], l3[2]))

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

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

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

D=A[0]+B[1]+C[2]

print(D)

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

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


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

quit()

Solution (Python):


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

    print("".join(c))

if __name__ == '__main__':
    main()

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

A = list(a)
B = list(b)
C = list(c)

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

Solution (Python):

one = input()
two = input()
thr = input()
print(one[0]+two[1]+thr[2])

Solution (Python):
str1 = input()
str2 = input()
str3 = input()
print(str1[0]+str2[1]+str3[2])

Solution (Python):
STR1 = input()
STR2 = input()
STR3 = input()
s1 = list(STR1)
s2 = list(STR2)
s3 = list(STR3)
out = s1[0]+s2[1]+s3[2]
print(out)

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

Solution (Python):


ret = ""
line = input()
ret += line[0]
line = input()
ret += line[1]
line = input()
ret += line[2]
print(ret)

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

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

print(string)

Solution (Python):
c = 0
for i in range(3):
    l = input()
    print(l[c], end="")
    c += 1

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

print("{}{}{}".format(c1[0],c2[1],c3[2]))

Solution (Python):
def main():
    a = input()
    b = input()
    c = input()
    print(a[0],end='')
    print(b[1],end='')
    print(c[2])

if __name__ == '__main__':
    main()

Solution (Python):
c=[]

for i in range(3):
    c.append(input())
ca = c[0] + c[1] + c[2]
cn = list(ca)
print(ca[0] + ca[4] + ca[8])

Solution (Python):

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

aa=list(a)
bb=list(b)
cc=list(c)

print('{0}{1}{2}'.format(aa[0],bb[1],cc[2]))

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

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

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

Solution (Python):



l = ""

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

print(l)

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

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

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

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

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

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

if __name__ == "__main__":
    main()

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

Solution (Python):
x = ""
for i in range(3):
    S = input()
    char_list = list(S)
    x = x + char_list[i]
print(x)

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

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

Solution (Python):
c = []

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


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

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

ans=[]
ans.append(a[0])
ans.append(b[1])
ans.append(c[2])
ans=''.join(ans)
print(ans)

Solution (Python):
a = ""

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

print(a)

Solution (Python):
C1 = list(input())
C2 = list(input())
C3 = list(input())
C=[C1,C2,C3]
print(C[0][0]+C[1][1]+C[2][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):
if __name__ == '__main__':
    mat = [[line for line in input()] for _ in range(3)]
    for i in range(3):
        print(mat[i][i], end='')
    print()

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):





if __name__ == '__main__':
    strings = [list(map(str, input())) for _ in range(3)]
    print(strings[0][0] + strings[1][1] + strings[2][2])

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

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

    return C1[0] + C2[1] + C3[2]

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

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

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

Solution (Python):
s = [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[2])

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):


_a = input()
_b = input()
_c = input()

ans = _a[0] + _b[1] + _c[2]
print(ans)

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

print(c_1[0]+c_2[1]+c_3[2])

Solution (Python):
n=input()
m=input()
a=input()
b=n[0]+m[1]+a[2]
print(''.join(b))

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

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

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

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

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

Solution (Python):

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

Solution (Python):


A = []
A.append(list(input()))
A.append(list(input()))
A.append(list(input()))

print("".join([A[0][0], A[1][1], A[2][2]]))

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

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

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][0] + s[1][1] + s[2][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("".join(C[i][i] for i in range(len(C))))

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

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

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

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

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

Solution (Python):
def ketanowa(p):
    ans=0
    p=str(p)
    for i in p:
        ans+=int(i)
    return ans

def main():
    temp1=input()
    temp2=input()
    temp3=input()
    


    print(temp1[0]+temp2[1]+temp3[2])
    

if __name__ == '__main__':
    main()

Solution (Python):
A=list(str(input()))
B=list(str(input()))
C=list(str(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 i in range(3)]
print(c[0][0]+c[1][1]+c[2][2])

Solution (Python):
work1 = input()
work2 = input()
work3 = input()
print(work1[0]+work2[1]+work3[2])

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

print(a+b+c)

Solution (Python):
s=input()
ss=input()
sss=input()

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

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

Solution (Python):
n = input()
l = input()
m = input()
print(n[0] +l[1]+m[2])

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

Solution (Python):
import sys

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

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

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