Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import math
from collections import deque
n = int(input())
#x, y = map(int,input().split())
A = list(map(int,input().split()))
ans = 0
B = deque()
if n%2==0:
    for i in range(n):
        a=str(A[i])
        if i%2==1:
            B.appendleft(a)
        else:
            B.append(a)
if n%2==1:
    for i in range(n):
        if i%2==0:
            B.appendleft(a)
        else:
            B.append(a)
print(' '.join(B))

Fixed submission:
# coding: utf-8
n=int(input())
A=list(map(int,input().split()))
B=[0]*n
l=n//2
if n%2==0:
    for i in range(n):
        if i%2==0:
            B[l+i]=str(A[i])
            l=l+i
        else:
            B[l-i]=str(A[i])
            l=l-i
else:
    for i in range(n):
        if i%2==0:
            B[l-i]=str(A[i])
            l=l-i
        else:
            B[l+i]=str(A[i])
            l=l+i
print(' '.join(B))

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
n=int(input())
A=list(map(int,input().split()))
B=[]
if n%2==0:
    for i in range(n):
        if i%2==0:
            B.append(str(A[i]))
        else:
            B.insert(0,str(A[i]))
else:
    for i in range(n):
        if i%2!=0:
            B.append(str(A[i]))
        else:
            B.insert(0,str(A[i]))
print(' '.join(B))

Fixed submission:
# coding: utf-8
n=int(input())
A=list(map(int,input().split()))
B=[0]*n
l=n//2
if n%2==0:
    for i in range(n):
        if i%2==0:
            B[l+i]=str(A[i])
            l=l+i
        else:
            B[l-i]=str(A[i])
            l=l-i
else:
    for i in range(n):
        if i%2==0:
            B[l-i]=str(A[i])
            l=l-i
        else:
            B[l+i]=str(A[i])
            l=l+i
print(' '.join(B))

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
n=int(input())
A=list(map(int,input().split()))
B=[]
for i in range(n):
    if n%2==0:
        if i%2==0:
            B.append(str(A[i]))
        else:
            B.insert(0,str(A[i]))
    else:
        if i%2!=0:
            B.append(str(A[i]))
        else:
            B.insert(0,str(A[i]))
print(' '.join(B))

Fixed submission:
# coding: utf-8
n=int(input())
A=list(map(int,input().split()))
B=[0]*n
l=n//2
if n%2==0:
    for i in range(n):
        if i%2==0:
            B[l+i]=str(A[i])
            l=l+i
        else:
            B[l-i]=str(A[i])
            l=l-i
else:
    for i in range(n):
        if i%2==0:
            B[l-i]=str(A[i])
            l=l-i
        else:
            B[l+i]=str(A[i])
            l=l+i
print(' '.join(B))

Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
n=int(input())
A=list(map(int,input().split()))
B=[]
for i in range(n):
    B.append(str(A[i]))
    B=B[::-1]
print(' '.join(B))

Fixed submission:
# coding: utf-8
n=int(input())
A=list(map(int,input().split()))
B=[0]*n
l=n//2
if n%2==0:
    for i in range(n):
        if i%2==0:
            B[l+i]=str(A[i])
            l=l+i
        else:
            B[l-i]=str(A[i])
            l=l-i
else:
    for i in range(n):
        if i%2==0:
            B[l-i]=str(A[i])
            l=l-i
        else:
            B[l+i]=str(A[i])
            l=l+i
print(' '.join(B))