Problem:
 Score : 300 points    Problem Statement 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:   Append a_i to the end of b .  Reverse the order of the elements in b .   Find the sequence b obtained after these n operations.      Constraints  1 \leq n \leq 2\times 10^5  0 \leq a_i \leq 10^9  n and a_i are integers.         Input Input is given from Standard Input in the following format:  n  a_1  a_2  ...  a_n       Output Print n integers in a line with spaces in between.
The i -th integer should be b_i .        Sample Input 1 4
1 2 3 4      Sample Output 1 4 2 1 3   After step 1 of the first operation, b becomes: 1 .  After step 2 of the first operation, b becomes: 1 .  After step 1 of the second operation, b becomes: 1, 2 .  After step 2 of the second operation, b becomes: 2, 1 .  After step 1 of the third operation, b becomes: 2, 1, 3 .  After step 2 of the third operation, b becomes: 3, 1, 2 .  After step 1 of the fourth operation, b becomes: 3, 1, 2, 4 .  After step 2 of the fourth operation, b becomes: 4, 2, 1, 3 .   Thus, the answer is 4 2 1 3 .       Sample Input 2 3
1 2 3      Sample Output 2 3 1 2  As shown above in Sample Output 1, b becomes 3, 1, 2 after step 2 of the third operation. Thus, the answer is 3 1 2 .       Sample Input 3 1
1000000000      Sample Output 3 1000000000       Sample Input 4 6
0 6 7 6 7 0      Sample Output 4 0 6 6 0 7 7

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
odd = a[0::2]
even = a[1::2]
if n % 2 == 1:
    odd = odd[::-1]
    ans = odd + even
else:
    even = even[::-1]
    ans = even + odd
print(*ans)

Solution (Python):

n=int(input())
a=list(map(int,input().split()))

from collections import deque
b=deque()
for i in range(n):
    if n%2==i%2:
        b.append(a[i])
    else:
        b.appendleft(a[i])
print(*b)

Solution (Python):
n = int(input())
a = [int(_) for _ in input().split()]
left = [0] * (n//2)
right = [0] * (n//2)
if n % 2 == 0:
    left = a[n:0:-2]
    right = a[0:n:2]
    ans = left + right
else:
    left  = a[n:1:-2]
    right = a[1:n:2]
    ans = left + [a[0]] + right
for i in ans:
    print(i, end=" ")

Solution (Python):
N = int(input())
arr = list(input().split())
if N % 2 == 0:
    print(" ".join(arr[-1::-2]) + " " + " ".join(arr[::2]) )
else:
    print(" ".join(arr[-1::-2]) + " " + " ".join(arr[1::2]) )

Solution (Python):
n = int(input())
a = list(input().split())

if n%2==1:
    print(" ".join(a[n-1::-2]+a[1:n+1:2]))
else:
    print(" ".join(a[n::-2]+a[:n+1:2]))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
even = []
odd = []
b = []
for i in range(n):
    if (i+1) % 2 == 0:
        even.append(i+1)
    else:
        odd.append(i+1)
if n%2 == 0:
    even.reverse()
    for x in even:
        b.append(x)
    for x in odd:
        b.append(x)
else:
    odd.reverse()
    for x in odd:
        b.append(x)
    for x in even:
        b.append(x)
ans = ""
for x in b:
    ans += str(a[x-1]) + " "
print(ans[:-1])

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
if n%2 ==0:
    b = a[1::2][::-1]+a[::2]
    print(*b)
else:
    b =a[::2][::-1]+a[1::2]
    print(*b)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
if n % 2 == 0:
    b = a[1::2][::-1] + a[::2]
    print(*b)
else:
    b = a[::2][::-1] + a[1::2]
    print(*b)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
if n%2==0:
  a=0
else:
  a=1
for i in range((n+1)//2):
  print(l[n-2*i-1],end=' ')
for i in range(n//2):
  print(l[2*i+a],end=' ')

Solution (Python):
from collections import deque
n=int(input())
a=deque([int(i) for i in input().split()])
b=deque()

if n%2==0:
    for i in range(n):
        if i % 2 == 0:
            b.append(a.popleft())
        else:
            b.appendleft(a.popleft())
else:
    for i in range(n):
        if i % 2 == 0:
            b.appendleft(a.popleft())
        else:
            b.append(a.popleft())
print(*b)

Solution (Python):
n = int(input())

A = list(map(int, input().split()))

B = []
C = []

for i in range(n):
    if i % 2 == 0:
        B.append(str(A[i]))
    else:
        C.append(str(A[i]))

if n % 2 == 0:
    s = " ".join(list(reversed(C)))
    t = " ".join(B)
    print(s + " " + t)
else:
    s = " ".join(list(reversed(B)))
    t = " ".join(C)
    print(s + " " + t)

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
if n%2==0:
    B = A[1::2][::-1] + A[::2]
    print(*B)
else:
    B = A[::2][::-1] + A[1::2]
    print(*B)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))

from collections import deque
q=deque()
q.append(a[0])
for i in range(1,n):
    if i%2==1:
        q.append(a[i])
    else:
        q.appendleft(a[i])
if n%2==0:
    print(*list(q)[::-1])
else:
    print(*q)

Solution (Python):
from collections import deque

n=int(input())
a=list(map(int,input().split()))

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

print(*ans)

Solution (Python):
from collections import deque
N = int(input())
A = list(map(int,input().split()))
d = deque()
for i in range(N):
  if N%2==0:
    if i%2==0: d.append(A[i])
    else: d.appendleft(A[i])
  else:
    if i%2==0: d.appendleft(A[i])
    else: d.append(A[i])
print(*d)

Solution (Python):

from collections import deque
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)


n = int(input())
a = list(map(int, input().split()))
b = deque()
for i in range(n):
    if i % 2 == 0:
        b.append(a[i])
        continue
    b.appendleft(a[i])
if n % 2 == 1:
    b.reverse()
print(*b)

Solution (Python):
def main():
    length = int(input())
    numbers = list(map(int, input().split()))
    answer = [0] * length
    if length % 2:
        answer[:length // 2 + 1] = numbers[::-2]
        answer[length // 2 + 1:] = numbers[1::2]
    else:
        answer[:length // 2] = numbers[::-2]
        answer[length // 2:] = numbers[::2]
    print(" ".join(list(map(str, answer))))


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b = [0] * n
left = 0
right = n-1
for i in range(n):
    x = a.pop()
    if i % 2 == 0:
        b[left] = x
        left += 1
    else:
        b[right] = x
        right -= 1
print(*b)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
b=a[::-1] 

ans=[]

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

Solution (Python):
from collections import deque
n = int(input())
lis = list(input().split())
ans = deque([])
x = n % 2
for i in lis:
    
    if x % 2 == 0:
        ans.append(i)
    else:
        ans.appendleft(i)
    x += 1
print(" ".join(ans))

Solution (Python):
from collections import deque
n=int(input())
a=list(map(int,input().split()))
b=deque()
for i in range(n):
    if(i%2==0):
        b.append(a[i])
    else:
        b.appendleft(a[i])

for i in range(n) if n%2==0 else (reversed(range(n))):
    print(b[i],end=' ')

Solution (Python):
n=int(input())

a=list(map(int,input().split()))
b=[0]*n
cen=n//2
if n%2:
    for i in range(0,n):
        if i%2==1:
            b[cen+(i+1)//2]=a[i]
        else:
            b[cen-(i+1)//2]=a[i]
else:
    for i in range(0,n):
        if i%2==1:
            b[cen-(i+1)//2]=a[i]
        else:
            b[cen+(i+1)//2]=a[i]
"""
for i in range(n):
    b.append(a[i])
    b.reverse()
"""
for i in range(n):
    print(b[i],end=" ")

Solution (Python):
import itertools
import math
import sys
from collections import Counter
from fractions import gcd
from functools import reduce
import sys
sys.setrecursionlimit(4100000)

n = int(input())
a = list(map(int, input().split()))
ans = [-1] * (2 *10 ** 5 + 1)
left = False
right = False
if n % 2 == 0:
    left = True
else:
    right = True
start = n // 2
ans[start] = a[0]
for i in range(1, n):
    if left:
        ans[start - i] = a[i]
        start -= i
        left = False
        right = True
    else:
        ans[start + i] = a[i]
        start += i
        left = True
        right = False
for i in range(n):
    print(ans[i], " ", sep="", end="")

Solution (Python):
import sys
read_=sys.stdin.buffer.readline
N=int(read_())
A=input().split()
if len(A)==1:
    print(A[0])
    exit()
if N%2==0:
    ans=A[1::2][::-1]
    ans.extend(A[::2])
else:
    ans=A[::2][::-1]
    ans.extend(A[1::2])
print(' '.join(ans))

Solution (Python):
import sys
read_=sys.stdin.buffer.readline

N=int(read_())
A=input().split()

if len(A)==1:
    print(A[0])
    exit()

B1=A[::2]
B2=A[1::2]

if N%2==0:
    B2.reverse()
    B2.extend(B1)
    print(' '.join(B2))
else:
    B1.reverse()
    B1.extend(B2)
    print(' '.join(B1))

Solution (Python):
from collections import deque
n = int(input())
a = list(map(int, input().split()))

d = deque()
for i, v in enumerate(a):
    if i % 2 == 0:
        d.appendleft(v)
    else:
        d.append(v)
if i % 2 == 1:
    d = list(d)[::-1]
print(*d, sep=' ')

Solution (Python):
from math import ceil
n = int(input())
a = list(map(int, input().split()))
a.reverse()
b = [0] * n
for i in range(n):
    if i % 2 == 0:
        b[i//2] = a[i]
    else:
        b[-(ceil(i/2))] = a[i]


for i in range(n):
    print(b[i])

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
if len(a)%2 == 1:
    print(*a[0::2][::-1] + a[1::2])
else:
    print(*a[1::2][::-1] + a[0::2])

Solution (Python):
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))

b = np.zeros(n, dtype='int')

cnt = 0
if n % 2 == 0:
    for i in range(n // 2):
        left_idx = n // 2 - 1 - i
        right_idx = n // 2 + i
        b[left_idx] = 2 * i + 1
        b[right_idx] = 2 * i + 2
    b = b[::-1]
else:
    for i in range(n // 2):
        left_idx = n // 2 - i
        right_idx = n // 2 + 1 + i
        b[left_idx] = 2 * i + 1
        b[right_idx] = 2 * i + 2
    b[0] = n


for i in a[[b - 1]]:
    print(i)

Solution (Python):
from collections import deque
n = int(input())
lst1 = list(map(int,input().split()))

p = sum(lst1)

b = deque([])

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

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

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]

b = [0] * n
center = n // 2

before = center
if n % 2 != 0:
    for i in range(len(a)):
        if i % 2 != 0:
            before = before + i
        else:
            before = before - i
        b[before] = a[i]
else:
    for i in range(len(a)):
        if i % 2 != 0:
            before = before - i
        else:
            before = before + i
        b[before] = a[i]

b = " ".join(list(map(str, b)))
print(b)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]

length = len(a)
b = [0] * length
center = length // 2

if len(a) % 2 != 0:
    before = center
    for i in range(len(a)):
        if i == 0:
            b[center] = a[i]
        else:
            if i % 2 != 0:
                before = before + i
            else:
                before = before - i
            b[before] = a[i]
else:
    before = center
    for i in range(len(a)):
        if i == 0:
            b[center] = a[i]
        else:
            if i % 2 != 0:
                before = before - i
            else:
                before = before + i
            b[before] = a[i]


L = [str(v) for v in b]
L = ' '.join(L)
print(L)

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]

even = []
odd = []

for i in range(n):
    if i % 2 == 0:
        odd.append(a[i])
    else:
        even.append(a[i])

if n % 2 == 0:
    even.reverse()
    ans = even + odd
    print(*ans)
else:
    odd.reverse()
    ans = odd + even
    print(*ans)

Solution (Python):
n = int(input())
lst = [x for x in input().split()]

lst1 = lst[0::2]
lst2 = lst[1::2]

if n % 2 == 0:
    lst2.reverse()
    ret = lst2 + lst1
else:
    lst1.reverse()
    ret = lst1 + lst2

print(" ".join(ret))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

B = []
T = []

if N % 2 == 0:
  for index, a in enumerate(A):
    if index % 2 == 1:
      T.append(a)
    else:
      B.append(a)
else:
  for index, a in enumerate(A):
    if index % 2 == 0:
      T.append(a)
    else:
      B.append(a)

T.reverse()
T.extend(B)


for b in T:
  print(b, end=" ")

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
odd = a[::2]
even = a[1::2]
even.reverse()
ans = even + odd
if n % 2:
  ans.reverse()
  
print(" ".join(list(map(str, ans))))

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
if n % 2 == 0:
    ans = [l[i] for i in range(n-1,-1,-2)] + [l[i] for i in range(0,n-1,2)]
    print(*ans)
else:
    ans = [l[i] for i in range(n-1,-1,-2)] + [l[i] for i in range(1,n-1,2)]
    print(*ans)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
print(*(A[::-2]+A[N%2::2]))

Solution (Python):
N = int(input())
A = [int(x) for x in input().split()]

t = []

for i in range(N)[::-1]:
	if i%2!=(N%2):
		t.append(A[i])

for i in range(N):
	if i%2==(N%2):
		t.append(A[i])



print(*t)

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
ans = []
if n == 1: print(a[0])
else:
    for i in a[::-2]:
        ans.append(i)
    if n % 2 == 0:
        for i in a[::2]:
            ans.append(i)
    else:
        for i in a[1::2]:
            ans.append(i)
print(*ans)

Solution (Python):
l1 = []
l2 = []
n = int(input())
a = list(map(int, input().split()))
flag = -1
for i in range(n):
    if flag < 0:
        l1.append(a[i])
    else:
        l2.append(a[i])
    flag *= -1
if n%2 == 0:
    print(*(list(reversed(l2))+l1))
else:
    print(*(list(reversed(l1))+l2))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b = []
if n % 2 == 0:
    for i in range(n // 2):
        b.append(a[- 2 * i - 1])
    for i in range(n // 2):
        b.append(a[2 * i])
else:
    for i in range(n // 2 + 1):
        b.append(a[- 2 * i - 1])
    for i in range(n // 2):
        b.append(a[2 * i + 1])
print(*b)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))

o=[]
e=[]
for i in range(n):
    if i%2==0:
        o.append(a[i])
    if i%2==1:
        e.append(a[i])

if n%2==0:
    E=[]
    for i in range(n//2):
        E.append(e[n//2-1-i])
    ans = []
    for i in range(n//2):
        ans.append(E[i])

    for i in range(n//2):
        ans.append(o[i])
    s = ""
    for i in range(len(ans)):
        s = s+str(ans[i])
        s = s+" "
    print(s)
    exit()
else:
    O=[]
    for i in range(len(o)):
        O.append(o[len(o)-1-i])
    ans = []
    for i in range(len(O)):
        ans.append(O[i])
    for i in range(n//2):
        ans.append(e[i])
    s = ""
    for i in range(len(ans)):
        s = s+str(ans[i])
        s = s+" "
    print(s)
    exit()

Solution (Python):
n = int(input())
S = list(map(int, input().split()))
S=S[::-1]
x=S[::2]
y=S[1::2]
b=x+y[::-1]
print(*b, sep=" ")

Solution (Python):
N = int(input())
D = list(map(int, input().split()))

res=[]
for i in range(len(D)-1,0,-2):
    res.append(D[i])
res.append(D[0])
start=(N+1)%2+1
for i in range(start,len(D),2):
    res.append(D[i])

for i in res:
    print(i,end=" ")

Solution (Python):
from collections import deque

def main():
    input()
    A = list(enumerate(input().split()))
    b = deque()
    (append1, append2) = (b.append, b.appendleft) if len(A) % 2 == 0 else (b.appendleft, b.append)
    for i, a in A:
        if i % 2 == 0:
            append1(a) 
        else:
            append2(a)

    print(" ".join(list(b)))

main()

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

s = [a[i] for i in range(0,n,2)]
t = [a[i] for i in range(1,n,2)[::-1]]
if n % 2 == 0:
    print(*t, end=' ')
    print(*s)
else:
    
    print(*s[::-1], end=' ')
    print(*t[::-1])

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
if len(a) == 1:
    res = a[0]
elif len(a) % 2 == 0:
    res = " ".join(map(str, a[-1::-2] + a[::2]))
else:
    res = " ".join(map(str, a[-1::-2] + a[1::2]))
print(res)

Solution (Python):
from collections import deque

def main():
    input()
    A = list(enumerate(input().split()))
    size = len(A)
    b = deque()
    for i, a in A:
        if i % 2 == 0:
            if size % 2 == 0:
                b.append(a)
            else:
                b.appendleft(a)    
        else:
            if size % 2 == 0:
                b.appendleft(a)
            else:
                b.append(a)

    print(" ".join(list(b)))

main()

Solution (Python):
n = int(input())
a = list(map(int, input().split()))


a_odd = a[::2]
a_even = a[1::2]

if n % 2 == 0:
    ans = a_even[::-1]
    ans.extend(a_odd)
else:
    ans = a_odd[::-1]
    ans.extend(a_even)

print(*ans)

Solution (Python):
from collections import deque
d = deque()
n = int(input())
alist = list(map(int, input().split()))
for i in range(n):
    if i % 2 == 0:
        d.append(alist[i])
    else:
        d.appendleft(alist[i])
if n % 2 == 0:
    d = list(d)
else:
    d = list(d)[::-1]
for element in d:
    print(element, end=" ")
print()

Solution (Python):
n = int(input())
A = [int(x) for x in input().split()]
B = []
if n % 2 == 0:
    for i in range(n // 2, 0, -1):
        B.append(A[2 * i - 1])
    for j in range(n // 2):
        B.append(A[2*j])
else:
    for k in range(n // 2, -1, -1):
        B.append(A[2 * k])
    for h in range(1, n // 2+1):
        B.append(A[2*h-1])


print(*B, sep=" ")

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
if n%2==1:
    print(*(a[::-2]+a[1::2]))
if n%2==0:
    print(*(a[::-2]+a[0::2]))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

b = [-1] * (n + 2)

mid = n // 2
left = mid - 1
right = mid + 1

b[mid] = a[0]

for i in range(1, n):
  if not i % 2 == n % 2:
    b[left] = a[i]
    left -= 1
  else:
    b[right] = a[i]
    right += 1

for i in b:
  if i < 0:
    continue
  print(i, end=" ")

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
B=[]
C=[]
for i in range(N):
  if i%2==0:
    B.append(A[i])
  else:
    C.append(A[i])
D=B[::-1]
E=C[::-1]
if N%2==0:
  print(*(E+B))
else:
  print(*(D+C))

Solution (Python):
from collections import deque

n = int(input())
a = list(map(int, input().split()))

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

for i in range(len(b)):
    print(b[i], end=" ")

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b = []

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

for i in range(len(b)):
    print(b[i], end=" ")

Solution (Python):

n=int(input())
A=list(map(int,input().split()))
l=[]
r=[]
k=1
for i in range(n):
    if i%2==0:
        r.append("{}".format(A[i]))
    else:
        l.append("{}".format(A[i]))
l.reverse()

b=l+r

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

print(" ".join(b))

Solution (Python):

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))

Solution (Python):
N=int(input())
A=list(input().split())
s = " ".join(A[::-2]) + " " + " ".join(A[N%2::2])
print(s)

Solution (Python):

N = int(input())
A = list(map(int, input().split()))
if N % 2 != 0:
    for i in range(N-1, -1, -2):
        print(A[i], end=" ")
    for i in range(1, N, 2):
        print(A[i], end=" ")
else:
    for i in range(N-1, 0, -2):
        print(A[i], end=" ")
    for i in range(0, N, 2):
        print(A[i], end=" ")

Solution (Python):
from collections import deque

n = int(input())
A = deque(map(int, input().split()))
B = deque()

if n%2==0:
  while(A):
    B.append(A.popleft())
    B.appendleft(A.popleft())
else:
  while(A):
    B.appendleft(A.popleft())
    if(A):
      B.append(A.popleft())

for i in range(n):
  print(B[i], end=" ")

Solution (Python):
from collections import deque
n = int(input())
dList = list(map(int,input().split()))
result = deque()

for i in range(n):
  if i % 2 == n % 2:
   result.append(dList[i])
  else:
   result.appendleft(dList[i])

for i in result:
  print(i,end=" ")

print()

Solution (Python):
from collections import deque
n = int(input())
dList = list(map(int,input().split()))
result = deque()

for i in range(n):
  if (i % 2 == 0 and n % 2 == 0) or (i % 2 != 0 and n % 2 != 0):
   result.append(dList[i])
  else:
   result.appendleft(dList[i])

for i in result:
  print(i,end=" ")

print()

Solution (Python):
from collections import deque

N = int(input())
A = list(map(int, input().split()))

d = deque()

if N % 2 == 0:
	for i in range(N):
		if (i + 1) % 2 == 1:
			d.append(A[i])
		else:
			d.appendleft(A[i])
else:
	for i in range(N):
		if (i + 1) % 2 == 1:
			d.appendleft(A[i])
		else:
			d.append(A[i])
			
print(*d)

Solution (Python):
def solve(n, A):
    return [A[n - 2 * i - 1] if i < n / 2 else A[2 * i - n] for i, a in enumerate(A)]

_n = int(input())
_A = list(map(int, input().split()))
print(*solve(_n, _A))

Solution (Python):
N = int(input())
lst = list(map(int,input().split()))
lst.reverse()
lst2 = [0] * N
for idx,i in enumerate(lst):
  if (idx % 2 == 0):
    lst2[idx // 2] = i
  else:
    lst2[N-(idx // 2)-1] = i
print(" ".join(map(str,lst2)))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
b = []
ans1 = a[0::2]
ans2 = a[1::2]
if n%2 == 0:
    ans2.reverse()
    b.extend(ans2)
    b.extend(ans1)
    print(*b)
else:
    ans1.reverse()
    b.extend(ans1)
    b.extend(ans2)
    print(*b)

Solution (Python):
n = int(input())
*a, = map(int, input().split())

right = a[1::2]
right.reverse()
left =  a[0::2]

b = []
b.extend(right)
b.extend(left)

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

print(*b)

Solution (Python):
from collections import deque

n = int(input())
a = list(map(int, input().split()))

b = deque()


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

Solution (Python):
n,p=int(input()),list(map(int,input().split()))
k= n//2 if n%2==0 else n//2+1
a,b=list(range(0,k)),list(range(k-1,n))[::-1]
c=[]
for x,y in zip(a,b):
  c.append(x)
  c.append(y)
c= c if n%2==0 else c[:-1]
c=c[::-1]
l=list([])
for x,y in zip(c,list(range(n))):
  l.append([x,y])
l=sorted(l)
for i in range(n):
  print(p[l[i][1]],end=" ")

Solution (Python):

n = int(input())
a = list(map(int,input().split()))

if n % 2:
    for i in a[-1::-2]:
        print(i,end=" ")
    for i in a[1::2]:
        print(i,end=" ")
else:
    for i in a[-1::-2]:
        print(i,end=" ")
    for i in a[0::2]:
        print(i,end=" ")

Solution (Python):
from collections import deque
n = int(input())
a = list(map(int,input().split()))
b = deque()
for i in range(n):
    if ((i+1) % 2) == (n % 2):
        b.appendleft(a[i])
    else:
        b.append(a[i])
ans = ' '.join([str(i) for i in b])
print(ans)

Solution (Python):
from collections import deque

n = int(input())
a = list(map(int,input().split()))
b = deque()
for i in range(n):
    if i % 2 == 0:
        b.append(a[i])
    else:
        b.appendleft(a[i])
if n % 2 == 1:
    b.reverse()
print(' '.join(map(str, b)))

Solution (Python):
import sys
import collections

input = sys.stdin.readline


def main():
    N = int(input())
    A = [int(x) for x in input().split()]

    B = collections.deque()

    for i, a in enumerate(A):
        if i & 1:
            B.appendleft(a)
        else:
            B.append(a)

    if N & 1:
        print(*reversed(B))
    else:
        print(*B)

    

if __name__ == '__main__':
    main()

Solution (Python):
from collections import deque

N = int(input())
A = list(map(int, input().split()))

answer = deque([])
for i, a in enumerate(A):
  if i % 2 == 0:
    answer.appendleft(a)
  else:
    answer.append(a)
    
answer = list(answer)
answer = answer if N % 2 else answer[::-1]

print(*answer)

Solution (Python):
from collections import deque
d = deque()
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    if i % 2 == 0:
        d.append(a[i])
    else:
        d.appendleft(a[i])

if n % 2 == 1:
    d.reverse()

for i in d:
    print(i)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

if n % 2 == 0:
    sk = 0
else:
    sk = 1
b = a[::-2] + a[sk::2]

print(*b)

Solution (Python):
from collections import deque
N = int(input())
A = list(map(int, input().split()))
B = deque([])
i = 0
if N & 1:
    B.appendleft(A[i])
    i += 1
while i < N:
    B.append(A[i])
    i += 1
    B.appendleft(A[i])
    i += 1
print(*B)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ki=a[0::2]
ki2=[]
for i in ki[::-1]:
    ki2.append(i)
guu=a[1::2]
guu2=[]
for i in guu[::-1]:
    guu2.append(i)

if n%2==0:
    kotae=guu2+ki
else:
    kotae=ki2+guu
kotae=" ".join(map(str,kotae))
print(kotae)

Solution (Python):

n = int(input())
a = list(map(int, input().split()))

if n % 2 == 0:
  ans = a[1::2][::-1] + a[::2]
  print(*ans)
else:
  ans = a[::2][::-1] + a[1::2]
  print(*ans)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
A = LIST()

que = deque([])
for i, a in enumerate(A):
    j = i + 1
    
    if (n - j) % 2 == 0:
        que.appendleft(a)
    else:
        que.append(a)
print(*que)

Solution (Python):
from collections import deque

N = int(input())
a = list(map(int, input().split()))

b = deque()

if N % 2 == 0:
    for i in range(0, N, 2):
        b.append(a[i])

    for i in range(1, N, 2):
        b.appendleft(a[i])
else:
    for i in range(0, N, 2):
        b.appendleft(a[i])

    for i in range(1, N, 2):
        b.append(a[i])

print(*b)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
a = LIST()

tmp1 = []
tmp2 = []

for i, a in enumerate(a):
    if i%2 == 0:
        tmp1.append(a)
    else:
        tmp2.append(a)
if n%2 == 0:
    print(*(tmp2[::-1]+tmp1))
else:
    print(*(tmp1[::-1]+tmp2))

Solution (Python):
"""TLE
N = int(input())
sequence = list(input().split())
ans = []
for i in range(N):
    a_i = sequence[i]
    ans.append(a_i)
    ans = ans[::-1]
print(" ".join(ans))
"""

from collections import deque
n = int(input())
sequence = deque(map(int,input().split()))
ans = deque()
if n % 2 == 1:
    for i in range(n):
        if i % 2 == 0:
            ans.appendleft(sequence[0])
        else:
            ans.append(sequence[0])
        sequence.popleft()
        
else:
    for i in range(n):
        if i % 2 == 1:
            ans.appendleft(sequence[0])
        else:
            ans.append(sequence[0])
        sequence.popleft()
        
print(*ans)

Solution (Python):
n=int(input())
a=input().split()
a_even=[a[i] for i in range(0,n,2)]
a_odd=[a[i] for i in range(1,n,2)]

if n%2==1:
    a_even.reverse()
    ans=' '.join(a_even) +' ' + ' '.join(a_odd)
    print(ans)
else:
    a_odd.reverse()
    ans=' '.join(a_odd)+' '+' '.join(a_even)
    print(ans)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
b = [0] * n
for i in range(n):
    j = n - i * 2 - 1
    if j < 0:
        j = -j - 1
    b[i] = a[j]
print(*b)

Solution (Python):
n = int(input())
nums = [i for i in input().split()]

ans = nums[1::2][::-1] + nums[::2]
if n == 1:
    print(''.join(nums))
elif n % 2 != 0:
    print(' '.join(ans[::-1]))
else:
    print(' '.join(ans))

Solution (Python):
from collections import deque
n = int(input())
a = list(map(int, input().split()))
b = deque()
for i in range(n):
    if i % 2 == n % 2:
        b.append(a[i])
    else:
        b.appendleft(a[i])

print(*list(b))

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
from collections import deque

B = deque()

if len(A) %2 ==0:
    for idx, a in enumerate(A):

        if idx % 2 == 0:
            B.append(a)
        else:
            B.appendleft(a)

else:
    for idx, a in enumerate(A):

        if idx % 2 == 0:
            B.appendleft(a)
        else:
            B.append(a)
print(*B)

Solution (Python):
from collections import deque
n = int(input())
a = list(map(int, input().split()))

b = deque()

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


print(*list(b))

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    n = I()
    a = LI()
    even = False
    if n % 2 == 0:
        even = True
    N = n
    ans = []
    if even:
        
        while N > 1:
            ans.append(a[N-1])
            N = N - 2
        N = 1
        while N < n:
            ans.append(a[N-1])
            N = N + 2
    else:
        
        while N > 0:
            ans.append(a[N-1])
            N = N - 2
        N = 2
        while N <= n:
            ans.append(a[N-1])
            N = N + 2
    for a in ans:
        print(a, end=' ')
    print()

main()