You are given an integer sequence of length n, a_1, ..., a_n. Let us consider performing the following n operations on an empty sequence b.  The i-th operation is as follows:    1. Append a_i to the end of b.   2. Reverse the order of the elements in b.  Find the sequence b obtained after these n operations.
n=int(input())
a=list(map(int,input().split()))
b=[]
for i in range(n):
    b.append(a[i])
    b=b[::-1]
print(b)
n=int(input())
a=list(map(int,input().split()))
a=a[::-1]
b=[0]*n
x=0
y=1
t=True
for aa in a:
    if t:
        b[x]=aa
        x+=1
        t=False
    else:
        b[-y]=aa
        y+=1
        t=True
print(*b)