Buggy python submission (verdict: Time Limit Exceeded):
n =int(input())
ls = []

if n%2==0:
    for i,j in enumerate(input().split()):
        if i%2==0:
            ls.append(j)
        else:
            ls.insert(0,j)
else:
    for i,j in enumerate(input().split()):
        if i%2==1:
            ls.append(j)
        else:
            ls.insert(0,j)

print(" ".join(ls))

Fixed submission:
n =int(input())
a = list(map(str,input().split()))
lss = []
lse = []
if n%2==0:
    for i in range(n//2):
        lss.append(a[2*i])
    for i in range(n//2):
        lse.append(a[n-(2*i+1)])

else:
    for i in range(n//2):
        lss.append(a[2*i+1])
    for i in range(n//2+1):
        lse.append(a[n-2*i-1])


ls = lse+lss

print(" ".join(ls))

Buggy python submission (verdict: Time Limit Exceeded):
n =int(input())
ls = []
for i,j in enumerate(input().split()):
    if n%2==0:
        if i%2==0:
            ls.append(j)
        else:
            ls.insert(0,j)
    else:
        if i%2==1:
            ls.append(j)
        else:
            ls.insert(0,j)
print(" ".join(ls))

Fixed submission:
n =int(input())
a = list(map(str,input().split()))
lss = []
lse = []
if n%2==0:
    for i in range(n//2):
        lss.append(a[2*i])
    for i in range(n//2):
        lse.append(a[n-(2*i+1)])

else:
    for i in range(n//2):
        lss.append(a[2*i+1])
    for i in range(n//2+1):
        lse.append(a[n-2*i-1])


ls = lse+lss

print(" ".join(ls))

Buggy python submission (verdict: Time Limit Exceeded):
n =int(input())

a = [x for x in input().split()]

ls = []

ls.append(a[0])
if n%2==0:
    for i in range(1,n):
        if i%2==0:
            ls.append(a[i])
        else:
            ls.insert(0,a[i])
else:
    for i in range(1,n):
        if i%2==1:
            ls.append(a[i])
        else:
            ls.insert(0,a[i])

print(" ".join(ls))

Fixed submission:
n =int(input())
a = list(map(str,input().split()))
lss = []
lse = []
if n%2==0:
    for i in range(n//2):
        lss.append(a[2*i])
    for i in range(n//2):
        lse.append(a[n-(2*i+1)])

else:
    for i in range(n//2):
        lss.append(a[2*i+1])
    for i in range(n//2+1):
        lse.append(a[n-2*i-1])


ls = lse+lss

print(" ".join(ls))

Buggy python submission (verdict: Runtime Error):
n =int(input())

a = [str(x) for x in input().split()]

ls = []

ls.append(a[0)
if n%2==0:
    for i in range(1,n):
        if i%2==0:
            ls.append(a[i])
        else:
            ls.insert(0,a[i])
else:
    for i in range(1,n):
        if i%2==1:
            ls.append(a[i])
        else:
            ls.insert(0,a[i])

print(" ".join(ls))

Fixed submission:
n =int(input())
a = list(map(str,input().split()))
lss = []
lse = []
if n%2==0:
    for i in range(n//2):
        lss.append(a[2*i])
    for i in range(n//2):
        lse.append(a[n-(2*i+1)])

else:
    for i in range(n//2):
        lss.append(a[2*i+1])
    for i in range(n//2+1):
        lse.append(a[n-2*i-1])


ls = lse+lss

print(" ".join(ls))

Buggy python submission (verdict: Time Limit Exceeded):
n =int(input())

a = [int(x) for x in input().split()]

ls = []

ls.append(str(a[0]))
if n%2==0:
    for i in range(1,n):
        if i%2==0:
            ls.append(str(a[i]))
        else:
            ls.insert(0,str(a[i]))
else:
    for i in range(1,n):
        if i%2==1:
            ls.append(str(a[i]))
        else:
            ls.insert(0,str(a[i]))

print(" ".join(ls))

Fixed submission:
n =int(input())
a = list(map(str,input().split()))
lss = []
lse = []
if n%2==0:
    for i in range(n//2):
        lss.append(a[2*i])
    for i in range(n//2):
        lse.append(a[n-(2*i+1)])

else:
    for i in range(n//2):
        lss.append(a[2*i+1])
    for i in range(n//2+1):
        lse.append(a[n-2*i-1])


ls = lse+lss

print(" ".join(ls))