Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(i) for i in input().split()]

b = []

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

if(n % 2 == 0):
    b.reverse()
    

print(' '.join(map(str, b)))


Fixed submission:
from collections import *
n = int(input())
a = [int(i) for i in input().split()]

b = deque()

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

if(n % 2 == 0):
    b.reverse()
    

print(' '.join(map(str, b)))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(i) for i in input().split()]

b = []

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

if(n % 2 == 0):
    b.reverse()
    

print(*b)


Fixed submission:
from collections import *
n = int(input())
a = [int(i) for i in input().split()]

b = deque()

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

if(n % 2 == 0):
    b.reverse()
    

print(' '.join(map(str, b)))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(i) for i in input().split()]

b = []
r = 1

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

if(n % 2 == 0):
    b.reverse()
    

print(*b)


Fixed submission:
from collections import *
n = int(input())
a = [int(i) for i in input().split()]

b = deque()

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

if(n % 2 == 0):
    b.reverse()
    

print(' '.join(map(str, b)))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(i) for i in input().split()]

b = []
r = 1

b.append(a[0])
for i in range(1, n):
    if(r == 1):
        b.append(a[i])
        r = 0
    elif(r == 0):
        b.insert(0, a[i])
        r = 1
    else:
        pass

if(n % 2 == 0):
    b.reverse()
    

print(*b)


Fixed submission:
from collections import *
n = int(input())
a = [int(i) for i in input().split()]

b = deque()

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

if(n % 2 == 0):
    b.reverse()
    

print(' '.join(map(str, b)))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(input().split())

b = []
r = 1

b.append(a[0])
for i in range(1, n):
    if(r == 1):
        b.append(a[i])
        r = 0
    elif(r == 0):
        b.insert(0, a[i])
        r = 1
    else:
        pass

if(n % 2 == 0):
    b.reverse()
    

print(*b)


Fixed submission:
from collections import *
n = int(input())
a = [int(i) for i in input().split()]

b = deque()

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

if(n % 2 == 0):
    b.reverse()
    

print(' '.join(map(str, b)))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(input().split())

b = []
r = 1
l = 0
for i in range(n):
    if(i == 0):
        b.append(a[i])
        #print(b)
    else:
        if(r == 1):
            b.append(a[i])
            r = 0
            l = 1
            #print("r == 1", b)
        elif(l == 1):
            b.insert(0, a[i])
            r = 1
            l = 0
            #print("l == 1", b)
        else:
            pass

if(n % 2 == 0):
    b.reverse()
    

print(*b)


Fixed submission:
from collections import *
n = int(input())
a = [int(i) for i in input().split()]

b = deque()

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

if(n % 2 == 0):
    b.reverse()
    

print(' '.join(map(str, b)))