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

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

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

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

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

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

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

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

Solution (Python):

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

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 = str(input())
B = str(input())
C = str(input())

print(A[0]+B[1]+C[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):
print("".join([input()[i] for i in range(3)]))

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

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

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

print(ans)

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

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

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

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

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

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

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

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

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

Solution (Python):
import collections


def inputStrOnebyOne():
    s = list(input())
    return s


def inputOnebyOne_Int():
    a = list(int(x) for x in input().split())
    return a

def main():
    a = inputStrOnebyOne()
    b = inputStrOnebyOne()
    c = inputStrOnebyOne()
    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 = [list(input()) for _ in range(3)]
ans = [c for i, ci in enumerate(C) for j, c in enumerate(ci) if i == j]
print(''.join(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):
c = [input() for i 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):
sa = input()
sb = input()
sc = input()
print(sa[0] + sb[1] + sc[2])

Solution (Python):

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

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

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

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

Solution (Python):

"""
Created on Thu May 14 00:43:31 2020

@author: shinba
"""

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    l1=list(input())
    l2=list(input())
    l3=list(input())
    print(l1[0]+l2[1]+l3[2])
resolve()

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

Solution (Python):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


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





a = inputSLs(3)

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

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

Solution (Python):
import sys
import math
import bisect

def main():
    A = []
    for i in range(3):
        s = input()
        A.append(s[i])
    print(''.join(A))

if __name__ == "__main__":
    main()

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

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

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

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

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

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

print(s)

Solution (Python):
c = [input().strip() for _ in range(3)]
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])

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

if __name__ == '__main__':

    ABC_90_A()

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

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

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

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

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

c11 = diagonal_string[0][0]
c22 = diagonal_string[1][1]
c33 = diagonal_string[2][2]
print("{}{}{}".format(c11,c22,c33))

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

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

print(ans)

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

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

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

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

Solution (Python):
a,b,c=map(list,open(0));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):

c11,c12,c13 = input()
c21,c22,c23 = input()
c31,c32,c33 = input()

print(c11 + c22 + c33)

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


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



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)]  
    print(solve(c))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

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

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

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

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

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

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

    
if __name__ == '__main__':
    main()

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

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):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd



def I(): return int(input())


def MI(): return map(int, input().split())


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


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


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


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['Yes', 'No']
MOD = 10**9+7
inf = float('inf')
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)


show_flg = False



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

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


if __name__ == '__main__':
    main()

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

print(s1+s2+s3)

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

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):

import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  


C = []
for i in ra(3):
    print(input()[i], end='')

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):
answer=""

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

print(answer)

Solution (Python):
def examA():
    C = [SI()for _ in range(3)]
    ans = C[0][0]+C[1][1]+C[2][2]
    print(ans)
    return

def examB():
    N, M = LI()
    P = [0]*N
    S = [LSI()for _ in range(M)]
    pena = 0
    ac = set()
    for p,s in S:
        p = int(p)-1
        if s=="WA":
            P[p] += 1
        else:
            if p in ac:
                continue
            ac.add(p)
            pena += P[p]

    print(len(ac),pena)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(readline())
def LI(): return list(map(int,readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examA()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Solution (Python):


import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))

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

resolve()

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

Solution (Python):
def solve():

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



if __name__ == '__main__':
    solve()

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

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

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


if __name__ == '__main__':
    main()

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

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

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

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


c1 = input()
c2 = input()
c3 = input()
print(''.join((c1[0], c2[1], c3[2])))

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

print(line1[0],line2[1],line3[2],sep='')

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

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

Solution (Python):
s1 = input()
s2 = input()
s3 = input()
print(s1[0]+s2[1]+s3[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):
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("{}{}{}".format(a[0], b[1], c[2]))

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

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

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


if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
def main():
    mat = [list(input()) for i in range(3)]
    print(mat[0][0]+mat[1][1]+mat[2][2])
if __name__ == "__main__":
    main()

Solution (Python):
c=[input() for i in range(3)]
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):
C = [input() for i in range(3)]
print(''.join([C[0][0], C[1][1], C[2][2]]))

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

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

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

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

Solution (Python):
import sys

IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
MIIZ = lambda: list(map(lambda x: x-1, MII()))

INIT_VAL = 0
DP2 = lambda d1, d2: [[INIT_VAL]*d2 for _ in range(d1)]
DP3 = lambda d1, d2, d3: [[[INIT_VAL]*d3 for _ in range(d2)] for _ in range(d1)]

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

if __name__ == '__main__':
    main()

Solution (Python):
answer_list=[]
S=input()
answer_list.append(S[0])
S=input()
answer_list.append(S[1])
S=input()
answer_list.append(S[2])

print("".join(answer_list))

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

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

print(a+b+c)

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

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

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

Solution (Python):

import sys
try:
    from typing import List
except ImportError:
    pass


def solve(c: "List[str]"):
    print("".join(c[i][i] for i in range(3)))


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

Solution (Python):
    
icase=0    
if icase==0:
    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):
l = [input() for _ 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):
def resolve():
    A = input()
    B = input()
    C = input()
    print(A[0]+B[1]+C[2])


if '__main__' == __name__:
    resolve()

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

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

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

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

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

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

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

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

ans = []

ans.append(s1[0])
ans.append(s2[1])
ans.append(s3[2])

print("".join(ans))

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.append(input())

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

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

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

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

Solution (Python):
url = "https://atcoder.jp/contests/abc090/tasks/abc090_a"

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


if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
c1, c2, c3 = open(0).read().split()
print(c1[0]+c2[1]+c3[2])

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

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

Solution (Python):
s=open(0).read()
print(s[0]+s[5]+s[10])

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

Solution (Python):
c=[]
for _ 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())

d=[a[0],b[1],c[2]]
print("".join(d))

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

print(ans)

Solution (Python):
ans = ''

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

print(ans)

Solution (Python):

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

print("".join(ans))

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]

ans = a + b + c
print (ans)

Solution (Python):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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

if __name__ == '__main__':
    main()

Solution (Python):
C = list(input() for i in range(3))

S=''
for i in range(3):
  S=S+C[i][i]
  
print(S)

Solution (Python):
C=[input() for i 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):
c1 = input()
c2 = input()
c3 = input()

print(c1[0], end="")
print(c2[1], end="")
print(c3[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()
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])