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



Sample input:
ant
obe
rec


Sample output:
abc

Submission status: Runtime Error

Solution code:
c11,c12,c13=input().split()
c21,c22,c23=input().split()
c31,c32,c33=input().split()
print(c11,c22,c33)

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())

if N==1 or M==1:
    if N==M==1:
        print(0)
    else:
        if N<M:
            N,M = M,N
        print(N-2)

else:
    print((N*M) - N*2 - M*2 + 4)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
c = [list(map(str, input().split())) for i in range(3)]
print(c[0][0] + c[1][1] + c[2][2])

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())

small=min(N,M)
big  =max(N,M)
if small==1:
    if big==1:
        print (1)
    elif big==2:
        print (0)
    else:
        print (big-2)

elif small==2:
    print (0)
    
else:
    print ((small-2)*(big-2))

Submission status: Runtime Error

Solution code:
K = input().split()
N = int(K[0])
K = int(K[1])

count = 0
for b in range(K+1, N+1):
        count += int((N+K*(K+1)/2-(b-2)*(b-1)/2)/b)


if K != 0:
    for a in range(K, N+1):
        count += N-a
if K == 0:
        for a in range(1, N+1):
            count += N-a

print(count)

Submission status: Runtime Error

Solution code:
K = input().split()
N = int(K[0])
K = int(K[1])

count = 0
for b in range(K+1, N+1):
        count += int((N-K*(K+1)/2+(b-2)*(b-1)/2)/b)


if K != 0:
    for a in range(K, N+1):
        count += N-a
if K == 0:
        for a in range(1, N+1):
            count += N-a

print(count)

Submission status: Runtime Error

Solution code:
sanmoji=[]
for i in range(3):
    sanmoji[i] = input()[i]
print(sanmoji)

Submission status: Runtime Error

Solution code:
c11,c12,c13= map(str, input().split())
c21,c22,c23= map(str, input().split())
c31,c32,c33= map(str, input().split())
print(c11+c22+c33)

Submission status: Runtime Error

Solution code:
k = list(map(int,input()))
N , M =k[0],k[1]
if N == 2 or M == 2:
  print(0)
elif N == 1 or M == 1:
  print(abs(max(N,M)-2))
else:
  print((N-2) * (M-2))

Submission status: Runtime Error

Solution code:
a = []
for i in range(3):
    a.append(list(input().split()))


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

Submission status: Runtime Error

Solution code:
a = []
for i in range(3):
    a.append(list(map(int, input().split())))


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

Submission status: Runtime Error

Solution code:
import numpy as np
 
C = np.chararray((3,3))
C[0][:]=input().split()
C[1][:]=input().split()
C[2][:]=input().split()
 
print(C[0][0]C[1][1]C[2][2])

Submission status: Runtime Error

Solution code:
import numpy as np

C = np.chararray(input(),input(),input())

print(C[0][0],C[1][1],C[2][2])

Submission status: Runtime Error

Solution code:
import numpy as np

C = np.charray(input(),input(),input())

print(C[0][0],C[1][1],C[2][2])

Submission status: Runtime Error

Solution code:
a=import()
b=import()
c=import()
print(a[0]+b[1]+c[2])

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())

count = 0

for b in range(1, n + 1):
    p = n // b
    r = n % b
    count += p * max(0, b - k) + max(0, r - k + 1)

if k == 0:
    count -= n

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, k = list(map(int, input().split()))
                                                                                                                           
result = 0
for q in range(k, n):
  for b in range(q+1, n+1):
    result += int((n-q)/b)+1 if q > 0 else int((n-q)/b)

print(result)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
cnt = 0

for b in range(K+1, N+1):
    u = ((N - b)//b) + 1
    v =  (N - K)//b

    cnt += (b-K)*u + (v-u+1)*(-b*(u+v)+2*N-2*K+2)*(1/2)

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>

using namespace std;

typedef long long ll;
typedef vector <int> vi;
typedef vector < vector <int> > vvi;
const int HUGEI = 2147483647;  // (1 << 31) - 1
const ll HUGEL = 9223372036854775807;  // (1 << 63) - 1
const string ABC = "abcdefghijklmnopqrstuvwxyz";

int main(void) {
    return 0;
}

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

a, b = map(int, input().split())
print([str(x // 1000) == str(x % 100)[::-1] for x in range(a, b+1)].count(True))

Submission status: Runtime Error

Solution code:
b, c = map(int, input().split())
def caibun(b,c):
    count = 0
    for i in range(b, c+1, 1):
        a = str(i)
        if a == a[::-1]:
            count +=1
    print(count)
caibun(b,c)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

a, b = map(int, input().split())
n = 0

for i in range(a, b+1):
    if i // 10000 == i % 10 and (i // 1000) % 10 == (i % 100) // 10:
        n += 1

print(n)

Submission status: Runtime Error

Solution code:
N, M = [int(i) for i in input().split()]

if N == 1 and M == 1:
    print(1)
elif N == 1:
    print(M - 2)
elif M == 1:
    print(N - 2)
else:
    print(N * M - ((N - 2) * 2 + (M - 2) * 2) - 4)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print((a-2)*(b-2))

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
cnt=0
for i in range(A, B+1) :
    str_i=str(i)
    rev_i=str_i[::-1]
    t=len(str_i)//2
    if len(str_i)%2==1 and str_i[:t+1] == rev_i[:t+1] :
        cnt=cnt+1
print(cnt)

Submission status: Runtime Error

Solution code:
data = input()
data = data.split(" ")
n = int(data[0])
m = int(data[1])
if n>1 and m>1: print(n*m-2*(n+m)+4)
elif n=1 and m=1: print(1)
else: print(n*m-2)

Submission status: Runtime Error

Solution code:
x = input().split(" ")
n = int(x[0])
k = int(x[1])
count = 0

for b in range(1, n+1):
    p = n/b
    r = n % b
    count += p*max(0, b-k)
    count += max(0, r-k+1)
    
print(count)

Submission status: Runtime Error

Solution code:
#abc090b

a,b=map(int,raw_input().split())
cnt=0
for i in xrange(a,b+1):
 s=i%10
 t=i/10000%10
 u=i/10%10
 v=i/1000%10
 if s==t and u==v:
  cnt+=1
print cnt

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = raw_input()
y = raw_input()
z = raw_input()
print(x[0]+y[1]+z[2])

Submission status: Runtime Error

Solution code:
x = raw_input()
print(x[0][0]+x[1][1]+x[2][2])

Submission status: Runtime Error

Solution code:
x = input()
print(x[0][0]+x[1][1]+x[2][2])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input_raw()
b = input_raw()
c = input_raw()
 
print(a[0])
print(b[1])
print(c[2])

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
arr = (list(input().split('\r\n')))
print(arr[0][0] + arr[1][1] + arr[2][2])

Submission status: Runtime Error

Solution code:
arr = (list(input().split('\r\n')))
print('{}',arr[0][0] + arr[1][1] + arr[2][2])

Submission status: Runtime Error

Solution code:
# coding: utf-8
import numpy as np

N = map(list,input())
M = map(list,input())
L = map(list,input())

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

Submission status: Runtime Error

Solution code:
N, K = map(int, raw_input().split())

pairs = []

for i in range(1, N + 1):
    for j in range(1, N + 1):
        pairs.append((i, j))

res = 0

for (a, b) in pairs:
    if a % b >= K:
        res += 1

print(res)

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split(' '))
cards = N * M

if N > 1 and M > 1:
    front = (N-1)*2 + (M-1)*2
    print(cards - front)
elif N == 1 and M == 1:
    print(1)
else:
    print(max(N, M) - 2)

Submission status: Runtime Error

Solution code:
a = str()
for i in range(0, 3):
    a += raw_input().split(" ")[i]
print(a)

Submission status: Runtime Error

Solution code:
lst = []

for i in range(3):
    lst.append(raw_input().split())

res = lst[0][0] + lst[1][1] + lst[2][2]

print res

Submission status: Runtime Error

Solution code:
lst = []

for i in range(3):
    lst.append(raw_input().split())

print lst

res = lst[0][0] + lst[1][1] + lst[2][2]

print res

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())
ans=0
if n==1 and m==1:
    ans=1
else:
    ans=abs(n-2)*abs(m-2)
print(ans)

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())
ans=0
if n==1 and m==1:
    ans=1
else:
    ans=(n-2)*(m-2)
print(ans)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Runtime Error

Solution code:
for i in range(3):
  c = [input().split()]
  print(c[i])

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

N, K = map(int, input().split(" "))
c = 0
 
if K != 0:
    for b in range(K+1, N+1):
        s = N % b
        t = N - s
        p = t // b * (b - K)
        q = max(0, s - (K - 1))
        c += (p + q)
        
else:
    c = N ** 2

print(c)

Submission status: Runtime Error

Solution code:
def solve(n,k):
  counter = 0
  for i in range(n,k,-1):
    theValue = n//i * (i-k) + max(n%i-k+1,0)
    counter += theValue
  return counter

c = list(map(int, input().split()))
print(solve(c[0], c[1]))

Submission status: Runtime Error

Solution code:
def solve(n,k):
  counter = 0
  for i in range(n,k,-1):
    theValue = n//i * (i-k) + max(n%i-k+1,0)
    counter += theValue
  return counter

c = list(map(int, input().split()))
print(solve(c[0], c[1])

Submission status: Runtime Error

Solution code:

Tmp = []
Tmp = input().rstrip().split(' ')
A = Tmp[0]
Tmp = input().rstrip().split(' ')
B = Tmp[1]
Tmp = input().rstrip().split(' ')
C = Tmp[2]

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

Submission status: Runtime Error

Solution code:
N,M = map(int, input().split())

if N == 1 or M == 1:    
    if N+M == 2:
        print(1)
    else:
        print(max(N,M)-2)

elif N == 2 or M == 2:
    print(0)
    
else:
    print(N*M - ((N-2)*2+(M-2)*2+4))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if a>2 and b>2:
    cnt=a*b-(a*2+b*2-4)
elif (a==1 and b>2) or (a>2 and b==1):
    cnt=a*b-2
elif (a==2 or b==2):
    cnt=0
elif a==1 and b==1:
    cnt=1
print(cnt)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
cnt=0
for a in range(1,n+1):
    for b in range(k,n+1):
        if a%b>=k:
            cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
a = input().split()
b = input().split()
c = input().split()

d1 = a[0]
d2 = b[1]
d3 = c[2]

print(d1,d2,d3)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
m = 0
if K == 0:
    print(N**2)
    exit()

for b in range(K+1,N+1):
    m += (b-K)*(N//b)
    if N%b-K >= 0:
        m += N%b-K+1
print(m)

Submission status: Runtime Error

Solution code:
a = raw_input()
l = a.split()
A = l[0]
B = l[1]
ans = 0


if int(A) == int(B):
  ans = 1

for i in range(int(A),int(B)):
  C = list(str(i))
  if C[0] == C[4] and C[1] == C[3]:
    ans += 1
    
print(ans)

Submission status: Runtime Error

Solution code:
a = raw_input()
l = a.split()
A = l[0]
B = l[1]
ans = 0


for i in range(int(A),int(B)):
  C = list(str(i))
  if C[0] == C[4] and C[1] == C[3]:
    ans += 1
    
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=str(input())
b=str(input())
c=str(input())
slice=a[:1]
slice=b[1:2]
slice=c[2:3]
s=a[:1]+b[1:2]+c[2:3]
print(“s”)

Submission status: Runtime Error

Solution code:
ant
obe
rec

Submission status: Runtime Error

Solution code:
import sys

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

Submission status: Runtime Error

Solution code:
a=str(input())
b=str(input())
c=str(input())
print(“a[:1]+b[1:2]+c[2:3]”)

Submission status: Runtime Error

Solution code:
def main():
    a1 = input().split()[0]
    a2 = input().split()[1]
    a3 = input().split()[2]

    print (a1+a2+a3)


if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()

Submission status: Runtime Error

Solution code:
C1 = list(map(str,input().split()))
C2 = list(map(str,input().split()))
C3 = list(map(str,input().split()))

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

print(C)

Submission status: Runtime Error

Solution code:
a, b = list(map(int, input().split()))

count = 0
for i in range(10):
    for j in range(10):
        for k in range(1, 10):
            num = i * 100 + j * 1010 + k * 10001
            if num >= a and num <= b:
                count += 1

print(count)

Submission status: Runtime Error

Solution code:
nput()
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]))

Submission status: Runtime Error

Solution code:
a=str(input())
b=str(input())
c=str(input())
print(a[:1]b[1:2]c[2:3])

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
print(“a[:1]b[1:2]c[2:3]”)

Submission status: Runtime Error

Solution code:
a,b,c = input().split()
e,f,g = input().split()
h,i,j = input().split()
print(a,f,j)

Submission status: Runtime Error

Solution code:
s1 = list(map(str, input().split()))
s2 = list(map(str, input().split()))
s3 = list(map(str, input().split()))
print(s1[0]+s2[1]+s3[2])

Submission status: Runtime Error

Solution code:
edu
cat
ion

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
#
if __name__ == "__main__":
    l1 = input()
    l2 = input()
    l3 = input()
    print({}{}{}.format(l1[0], l2[1], l3[2]))

Submission status: Runtime Error

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