Buggy python submission (verdict: Time Limit Exceeded):
import sys
input=sys.stdin.readline
n=int(input())
a=input().split()
ans=[]
for i in range(n):
    if n%2==0:
        if i%2!=0:
            ans.insert(0,a[i])
        else:
            ans.append(a[i])
    else:
        if i%2==0:
            ans.insert(0,a[i])
        else:
            ans.append(a[i])
ans=' '.join(ans)
if n==1:
    ans=a[0]
print(ans)

Fixed submission:
import sys
input=sys.stdin.readline
n=int(input())
a=input().split()
ans=[]

for i in range(n):
    if n%2==0:
        if i%2==0:
            ans.append(a[i])
    else:
        if i%2!=0:
            ans.append(a[i])
ans=ans[::-1]
for i in range(n):
    if n%2==0:
        if i%2!=0:
            ans.append(a[i])
    else:
        if i%2==0:
            ans.append(a[i]) 
ans=ans[::-1]
ans=' '.join(ans)
if n==1:
    ans=a[0]
'''
for j in range(n):
    ans.insert(0,a[j])
'''
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input=sys.stdin.readline
n=int(input())
a=input().split()
ans=''
for i in range(n):
    if n%2==0:
        if i%2!=0:
            if i==1:
                ans=a[i]+ans
            else:
                ans=a[i]+' '+ans
        else:
            ans+=' '+a[i]
    else:
        if i%2==0:
            if i==0:
                ans=a[i]+ans
            else:
                ans=a[i]+' '+ans
        else:
            ans+=' '+a[i]
if n==1:
    ans=a[0]
print(ans)

Fixed submission:
import sys
input=sys.stdin.readline
n=int(input())
a=input().split()
ans=[]

for i in range(n):
    if n%2==0:
        if i%2==0:
            ans.append(a[i])
    else:
        if i%2!=0:
            ans.append(a[i])
ans=ans[::-1]
for i in range(n):
    if n%2==0:
        if i%2!=0:
            ans.append(a[i])
    else:
        if i%2==0:
            ans.append(a[i]) 
ans=ans[::-1]
ans=' '.join(ans)
if n==1:
    ans=a[0]
'''
for j in range(n):
    ans.insert(0,a[j])
'''
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input=sys.stdin.readline
n=int(input())
a=list(map(int,input().split()))
ans=''
for i in range(n):
    if n%2==0:
        if i%2!=0:
            if i==1:
                ans=str(a[i])+ans
            else:
                ans=str(a[i])+' '+ans
        else:
            ans+=' '+str(a[i])
    else:
        if i%2==0:
            if i==0:
                ans=str(a[i])+ans
            else:
                ans=str(a[i])+' '+ans
        else:
            ans+=' '+str(a[i])
if n==1:
    ans=a[0]
print(ans)

Fixed submission:
import sys
input=sys.stdin.readline
n=int(input())
a=input().split()
ans=[]

for i in range(n):
    if n%2==0:
        if i%2==0:
            ans.append(a[i])
    else:
        if i%2!=0:
            ans.append(a[i])
ans=ans[::-1]
for i in range(n):
    if n%2==0:
        if i%2!=0:
            ans.append(a[i])
    else:
        if i%2==0:
            ans.append(a[i]) 
ans=ans[::-1]
ans=' '.join(ans)
if n==1:
    ans=a[0]
'''
for j in range(n):
    ans.insert(0,a[j])
'''
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=''
for i in range(n):
    if n%2==0:
        if i%2!=0:
            if i==1:
                ans=str(a[i])+ans
            else:
                ans=str(a[i])+' '+ans
        else:
            ans+=' '+str(a[i])
    else:
        if i%2==0:
            if i==0:
                ans=str(a[i])+ans
            else:
                ans=str(a[i])+' '+ans
        else:
            ans+=' '+str(a[i])
if n==1:
    ans=a[0]
print(ans)

Fixed submission:
import sys
input=sys.stdin.readline
n=int(input())
a=input().split()
ans=[]

for i in range(n):
    if n%2==0:
        if i%2==0:
            ans.append(a[i])
    else:
        if i%2!=0:
            ans.append(a[i])
ans=ans[::-1]
for i in range(n):
    if n%2==0:
        if i%2!=0:
            ans.append(a[i])
    else:
        if i%2==0:
            ans.append(a[i]) 
ans=ans[::-1]
ans=' '.join(ans)
if n==1:
    ans=a[0]
'''
for j in range(n):
    ans.insert(0,a[j])
'''
print(ans)