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):
from collections import deque
n=int(input())
A=list(map(int,input().split()))
ans = deque([])
for i in range(n):
  if i % 2 == 0:
    ans.append(A[i])
  else:
    ans.appendleft(A[i])
if n % 2 == 1:
  ans = list(ans)[::-1]
print(*ans)

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

Solution (Python):
from collections import deque

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

deq = deque()
for i in range(n):
    if i%2==0:
        deq.appendleft(A[i])
    else:
        deq.append(A[i])
if n%2==0:
    for i in reversed(range(n)):
        print(deq[i],end=" ")
else:
    for i in range(n):
        print(deq[i],end=" ")

Solution (Python):

"""
Created on Sun Sep 27 02:46:15 2020

@author: liang
"""

from collections import deque

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

res = deque()

for i in range(n):
    if i % 2 == 0:
        res.append(A[i])
    else:
        res.appendleft(A[i])
        
if n % 2 == 1:
    print(" ".join(map(str,reversed(res))))
else:
    print(" ".join(map(str,res)))

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

b = [0] * n

if n % 2 == 0 :
    c = n//2 - 1
else :
    c = n // 2

b[c] = a[0]

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

if c != 0 :
    b.reverse()
    print(*b,sep=" ")
else :
    print(*b,sep=" ")

Solution (Python):
from collections import deque
from typing import List


def main():
    n = int(input())
    v = input().split(" ")
    print(*pp(n, v))


def pp(n: int, v: List[str]) -> List[str]:
    x = []
    y = deque([])

    if n % 2 == 0:
        for i in range(n):
            if i % 2 == 0:
                y.append(v[i])
            else:
                x.append(v[i])
    else:
        for i in range(n):
            if i % 2 == 0:
                x.append(v[i])
            else:
                y.append(v[i])

    x_len = len(x)
    ret = [""] * (x_len + len(y))
    for i in range(x_len):
        ret[i] = x.pop()

    for i in range(len(y)):
        ret[x_len + i] = y.popleft()

    return ret


if __name__ == "__main__":
    main()

Solution (Python):
from collections import deque
from typing import List


def main():
    n = int(input())
    v = input().split(" ")
    print(*pp(n, v))


def pp(n: int, v: List[str]) -> List[str]:
    x = []
    y = deque([])

    if n % 2 == 0:
        for i in range(n):
            if i % 2 == 0:
                y.append(v[i])
            else:
                x.append(v[i])
    else:
        for i in range(n):
            if i % 2 == 0:
                x.append(v[i])
            else:
                y.append(v[i])

    ret = []
    for i in range(len(x)):
        ret.append(x.pop())

    for i in range(len(y)):
        ret.append(y.popleft())

    return ret


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
a1, a2 = [],[]
for index, i in enumerate(a, start=1):
  if index % 2 == 0:
    a2.append(i)
  else:
    a1.append(i)

ans = []
if n % 2 == 0:
  ans = a2[::-1] + a1
else:
  ans = a1[::-1] + a2

print(" ".join(str(i) for i in ans))

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

Solution (Python):
n = int(input())
alst = list(map(int, input().split()))
bef = []
aft = []
for i, a in enumerate(alst):
  if i % 2 == 0:
    bef.append(a)
  else:
    aft.append(a)
if n % 2 == 0:
  ans = aft[::-1] + bef
else:
  ans = bef[::-1] + aft
print(*ans)

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


if len(a) %2 == 0:
    d.extend(a[::2])
    d.extendleft(a[1::2])
else:
    d.extend(a[1::2])
    d.extendleft(a[::2])
print(*list(d))

Solution (Python):
from collections import deque


N = int(input())
AS = [int(i) for i in input().split()]

b = deque()

x = 0 if len(AS) % 2 == 0 else 1

for i, a in enumerate(AS):
  if i % 2 == x:
    b.append(str(a))
  else:
    b.appendleft(str(a))

print(' '.join(list(b)))

Solution (Python):

def main():
    from collections import deque
    n = int(input())
    a = list(map(int, input().split()))
    ans = deque(maxlen=2*10**5)

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

    else:
        print(' '.join(ans))


if __name__ ==  "__main__":
    main()

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


if len(a) %2 == 0:
    d.extend(a[::2])
    d.extendleft(a[1::2])
else:
    d.extend(a[1::2])
    d.extendleft(a[::2])
print(*list(d))

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

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

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

Solution (Python):
from collections import deque
n = int(input())

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


q = deque([])

for i in range(1, n+1):
    if i % 2 == 0:
        q.appendleft(al[i-1])
    else:
        q.append(al[i-1])

ansl = list(q)
ansl = ansl[::-1] if n % 2 != 0 else ansl

print(*ansl, sep=" ")

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

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

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

Solution (Python):
from collections import deque


def solve(a):
    ans = deque()

    for i, aa in enumerate(a):
        if i % 2 == 0:
            ans.append(str(aa))
        else:
            ans.appendleft(str(aa))

    if len(a) % 2 == 1:
        ans.reverse()

    return list(ans)


if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))
    print(' '.join(solve(a)))

Solution (Python):
from collections import deque,defaultdict,Counter
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from bisect import bisect_left,bisect_right
from math import sqrt,gcd,ceil,floor,factorial

from functools import reduce
from pprint import pprint
from statistics import mean,median,mode
import sys
sys.setrecursionlimit(10 ** 6)

INF = float('inf')

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse=False):
    data.sort(key=lambda x:x[col],reverse=revese)
    return data

def mymax(data):
    M = -1*float('inf')
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float('inf')
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def mydictvaluesort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[1] )

def mydictkeysort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[0] )

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(' ')
        elif type(ls[0])==str:
            print(' '.join(ls))
        elif type(ls[0])==int:
            print(' '.join(map(str,ls)))
        else:
            print('Output Error')
    else:
        if len(ls)==0:
            print('')
        elif type(ls[0])==str:
            print(''.join(ls))
        elif type(ls[0])==int:
            print(''.join(map(str,ls)))
        else:
            print('Output Error')

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

def MS():
    return input().split()

def RS():
    return list(input())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input()) for _ in range(n) ]







n = I()
a = RI()

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



if n%2==1:
    myoutput(ls)
else:
    ls.reverse()
    myoutput(ls)

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

odd,even=a[::2],a[1::2]

if n%2==0:
  ans=even[::-1]+odd
else:
  ans=odd[::-1]+even

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 == (i + 1) % 2:
        d.appendleft(a[i])
    else:
        d.append(a[i])

print(*d)

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

odd_index = []
even_index = []
for i in range(n):
    if (i + 1) % 2 == 1:
        odd_index.append(a[i])
    else:
        even_index.append(a[i])

if n % 2 == 1:
    res = odd_index[::-1] + even_index
else:
    res = even_index[::-1] + odd_index

print(*res)

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

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

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

if n%2==0:
    S=a[-1::-2]+a[::2]
    for x in S:
        print(x,end=' ')
else:
    S=a[-1::-2]+a[1::2]
    for x in S:
        print(x,end=' ')
print()

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

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

print(*b)

Solution (Python):
n = int(input())
la = list(map(int, input().split()))
l1 = []
l2 = []
for i in range(n):
    if i % 2 == 0:
        l1.append(la[i])
    else:
        l2.append(la[i])

if n % 2 == 0:
    for i in reversed(l2):
        print(i, end=' ')
    for i in l1:
        print(i, end=' ')
else:
    for i in reversed(l1):
        print(i, end=' ')
    for i in l2:
        print(i, end=' ')

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

if (n - 1) % 2 == 0:
  top = [""] * ((n - 1) // 2)
  bottom = [""] * ((n - 1) // 2)
    
  t = (n - 1) // 2 - 1
  b = 0
  for i in range(1,n):
    if i % 2 == 1:
      bottom[b] = A[i]
      b += 1
    else:
      top[t] = A[i]
      t -= 1
else:
  top = [""] * ((n - 1) // 2 + 1)
  bottom = [""] * ((n - 1) // 2)
  
  t = (n - 1) // 2
  b = 0
  
  for j in range(1,n):
    if j % 2 == 1:
      top[t] = A[j]
      t -= 1
    else:
      bottom[b] = A[j]
      b += 1
      
print(*(top + [A[0]] + bottom))

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 = "")
    print(" ", end = "")
  for i in range(0, N, 2):
    print(A[i], end = "")
    if i != N - 2:
      print(" ", end = "")
    else:
      print("")
else:
  for i in range(N-1, -2, -2):
    print(A[i], end = "")
    print(" ", end = "")
  for i in range(1, N, 2):
    print(A[i], end = "")
    if i != N - 2:
      print(" ", end = "")
    else:
      print("")

Solution (Python):
from collections import deque
with open(0) as f:
    n, *a = map(int, f.read().split())
b = deque()
for idx, value in enumerate(a):
    if (idx & 1) ^ (n & 1):
        b.appendleft(value)
    else:
        b.append(value)
print(*b)

Solution (Python):
from collections import deque
with open(0) as f:
    n, *a = map(int, f.read().split())
b = deque()
for idx, value in enumerate(a):
    if (idx & 1) ^ (n & 1):
        b.appendleft(value)
    else:
        b.append(value)
print(*b)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=[]
if n%2==1:
    i=n
    while i>=1:
        ans.append(str(a[i-1]))
        i-=2
    i=2
    while i<=n:
        ans.append(str(a[i-1]))
        i+=2
    print(" ".join(ans))
else:
    i = n
    while i >= 1:
        ans.append(str(a[i - 1]))
        i -= 2
    i = 1
    while i <= n:
        ans.append(str(a[i - 1]))
        i += 2
    print(" ".join(ans))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=[]
if n%2==1:
    i=n
    while i>=1:
        ans.append(str(a[i-1]))
        i-=2
    i=2
    while i<=n:
        ans.append(str(a[i-1]))
        i+=2
    print(" ".join(ans))
else:
    i = n
    while i >= 1:
        ans.append(str(a[i - 1]))
        i -= 2
    i = 1
    while i <= n:
        ans.append(str(a[i - 1]))
        i += 2
    print(" ".join(ans))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
start = n - 1
while start >= 0:
    print(a[start],end=' ')
    start -= 2
if n % 2 == 0:
    start = 0
else:
    start = 1
while start < n:
    print(a[start],end=' ')
    start += 2

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
if n % 2 == 0:
    start = n - 1
    while start >= 0:
        print(a[start],end=' ')
        start -= 2
    start = 0
    while start < n:
        print(a[start],end=' ')
        start += 2
elif n % 2 == 1:
    start = n - 1
    while start >= 0:
        print(a[start],end=' ')
        start -= 2
    start = 1
    while start < n:
        print(a[start],end=' ')
        start += 2

Solution (Python):
def main():
    n = int(input())
    a_lst = list(map(int, input().split()))
    lst1 = []
    lst2 = []

    if n % 2 == 0:
        for i in range(n // 2):
            lst1.append(a_lst[-1 - i * 2])
        for i in range(n // 2):
            lst2.append(a_lst[i * 2])

    else:
        for i in range(n // 2):
            lst1.append(a_lst[-1 - i * 2])
        lst2.append(a_lst[0])
        for i in range(n // 2):
            lst2.append(a_lst[1 + i * 2])

    lst = lst1 + lst2
    ans = ''
    for i in range(n - 1):
        ans += '{} '.format(lst[i])
    ans += '{}'.format(lst[-1])
    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
n = 4
a = [1, 2, 3, 4]

n = int(input())
a = input().split()


if n % 2 == 0:
    y = [a[j] for j in range(1, n, 2)][::-1]
    z = [a[j] for j in range(0, n, 2)]

else:
    y = [a[j] for j in range(0, n, 2)][::-1]
    z = [a[j] for j in range(1, n, 2)]

print(" ".join(map(str, y + z)))

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

odd, even = a[::2], a[1::2]

if n % 2 == 0:
    ans = even[::-1] + odd
else:
    ans = odd[::-1] + even

print(*ans)

Solution (Python):
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right 
from heapq import heapify, heappop, heappush
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)

N,A = ilint()
B = deque()
for i in range(N):
    if i%2==0:
        B.append(A[i])
    else:
        B.appendleft(A[i])
B = list(B)
if N%2!=0:
    B = B[::-1]
lprint(B,' ')

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

b = []
if n%2 == 1:
    for i in a[n-1:0:-2]:
        b.append("{0}".format(i))
    b.append(str(a[0]))
    for i in a[1:n:2]:
        b.append("{0}".format(i))

if n%2 == 0:
    for i in a[n-1:0:-2]:
        b.append("{0}".format(i))
    for i in a[0:n:2]:
        b.append("{0}".format(i))

print(' '.join(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.append(a[i])
    else:
        b.appendleft(a[i])
if n%2 == 1:
    b.reverse()
print(*b, sep=' ')

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

l=a[0:n:2]
r=a[1:n:2]
if n%2==1:
    print(*l[::-1],*r)
else:
    print(*r[::-1],*l)

Solution (Python):
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

import string

def main():
    n = i_input()
    a = i_list()
    even = []
    odd = []
    for i,k in enumerate(a):
        if i%2==0:
            even.append(k)
        else:
            odd.append(k)

    even.reverse()
    even.extend(odd)
    if n%2==0:
        even.reverse()
    print(" ".join(map(str, even)))



if __name__=="__main__":
    main()

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

B = []
for i in range(N-1, -1, -2):
  B.append(A[i])

for j in range(N % 2, N, 2):
  B.append(A[j])

print(" ".join(B))

Solution (Python):
from collections import deque

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

order = n%2
ans = deque([])
for i in range(n):
    if i%2 == order:
        ans.append(a[i])
    else:
        ans.appendleft(a[i])
for el in ans:
    print(el, end=' ')

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

forward = True
sec, first = [], []
for i in range(n):
    if i%2:
        first.append(a[i])
    else:
        sec.append(a[i])
arr = first[::-1] + sec
if len(first) != len(sec):
    arr = arr[::-1]

for el in arr:
    print(el, end=' ')

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

Solution (Python):
n = int(input())
a_list = [int(x) for x in input().split()]
print(*(a_list[::-2] + a_list[n&1::2]))

Solution (Python):
n = int(input())
a_list = [int(x) for x in input().split()]
print(*(a_list[n-1::-2] + a_list[n % 2::2]))

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

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

from collections import deque
B = deque([])

rev = False

for i in range(N):
  if rev:
    B.appendleft(A[i])
  else:
    B.append(A[i])
  rev ^= True
  
if rev:
  B = list(B)[::-1]
    
print(*B)

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

from collections import deque
B = deque([])

rev = False

for i in range(N):
  if not rev:
    B.append(A[i])
  else:
    B.appendleft(A[i])
  rev ^= True
  
if rev:
  B = list(B)[::-1]
    
print(*B)

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n = i_input()
    num_list = i_list()

    ans_list = deque()

    for i, num in enumerate(num_list):
        if i % 2 == 0:
            ans_list.append(num)
        else:
            ans_list.appendleft(num)

    if n % 2 == 0:
        print(*ans_list)
    else:
        tmp_list = []
        for ans in ans_list:
            tmp_list.append(ans)
        print(*tmp_list[::-1])


if __name__ == '__main__':
    main()

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

print(*b)

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

front = False
for i in a:
    if front:
        b.insert(0, i)
        front = False
    else:
        b.append(i)
        front = True




if front:
    b.reverse()


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


first = a[0:n:2]
last = a[1:n:2]
last = last[::-1]
answer = last + first
if n%2 != 0:
    answer = answer[::-1]

print(*answer, sep=" ")

Solution (Python):

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

odd = [a[i] for i in range(n) if i%2 == 1] 
even = [a[j] for j in range(n) if j%2 == 0]

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

Solution (Python):

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

odd = [a[i] for i in range(n) if i%2 == 1] 
even = [a[j] for j in range(n) if j%2 == 0]

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

Solution (Python):
from collections import deque

b=deque()

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

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

if n%2==1:
    b=b[::-1]
b=[str(i) for i in b]

print(" ".join(b))

Solution (Python):
n=int(input())
a=list(input().split())
from collections import deque
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:
    for i in range(n):
        if i%2==0:
            b.appendleft(a[i])
        else:
            b.append(a[i])
B=[]
for i in range(n):
    B.append(b.popleft())
print(" ".join(B))

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-1,2):
        b.append(a[i])
else:
    for i in range(n-1,-1,-2):
        b.append(a[i])
    for i in range(1,n-1,2):
        b.append(a[i])
print(*b)

Solution (Python):
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

from collections import deque
n = INT()
a = LI()
b = deque()

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

Solution (Python):

n = int(input())
a = list(map(int,input().split()))
a = [0] + a

dam1=[]
dam2=[]
for i in range(1,n+1):
    if i%2==1:
        dam1.append(a[i])
    else:
        dam2.append(a[i])

if n%2==0:
    dam2.reverse()
    out=dam2 + dam1
elif n%2==1:
    dam1.reverse()
    out=dam1 + dam2
print(*out)

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







front = []
back = []

for i in range(N):
  if i % 2 == 0:
    back.append(A[i])
  else:
    front.append(A[i])
    
ans = None
if N % 2 == 0:
  ans = front[::-1] + back
else:
  ans = back[::-1] + front
  
print(*ans)

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







ans = None
if N % 2 == 1:
  ans = A[::2][::-1] + A[1::2]
else:
  ans = A[1::2][::-1] + A[::2]
print(*ans)

Solution (Python):
from collections import deque

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

d = deque()

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

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

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

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

if n == 1:
    l = list(map(str,l))
    print(" ".join(l))
    exit()

ans = []

if n%2 == 0:
    tmp = n
    for j in range(n//2-1):
        ans.append(tmp)
        tmp -= 2
    ans.append(tmp)
    ans.append(1)
    tmp = 1
    for j in range(n//2-1):
        tmp += 2
        ans.append(tmp)
else:
    tmp = n
    for j in range(n//2):
        ans.append(tmp)
        tmp -= 2
    ans.append(tmp)
    tmp = 2
    for j in range(n//2):
        ans.append(tmp)
        tmp += 2

ans2 = [0]*n
cnt = 0
for i in ans:
    ans2[cnt] = str(l[i-1])
    cnt += 1


print(" ".join(ans2))

Solution (Python):
import math

n = int(input())
aL = list(map(int, input().split(" ")))

l = []
r = []
for i in range(n):
    if i % 2 == 0:
        l.append(aL[i])
    else:
        r.append(aL[i])

if n % 2 == 0:
    print(*list(reversed([*reversed(l), *r])))
else:
    print(*reversed(l), *r)

Solution (Python):
from collections import deque

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

b = deque([])

if n % 2 == 0:
    flag = True
else:
    flag = False

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

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

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

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

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 collections
N = int(input())
lsa = list(map(str,input().split()))
lsb = collections.deque()
if N%2 == 0:
    for i in range(N):    
        if i % 2 == 0:
            lsb.append(lsa[i])
        else:
            lsb.appendleft(lsa[i])
if N%2 == 1:
    for i in range(N):
        if i % 2 == 1:
            lsb.append(lsa[i])
        else:
            lsb.appendleft(lsa[i])

print(' '.join(lsb))

Solution (Python):
from collections import deque
n = int(input())
a = list(input().split())
q = deque()
for i in range(n):
    if n&1:
        if i&1:
            q.append(a[i])
        else:
            q.appendleft(a[i])
    else:
        if i&1:
            q.appendleft(a[i])
        else:
            q.append(a[i])

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

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

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 == 0:
    print(*list(b))
else:
    print(*list(b)[::-1])

Solution (Python):
from collections import deque

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

b = deque()

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

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

Solution (Python):
'''
Created on 2020/08/28

@author: harurun
'''
def main():
  from collections import deque
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  n=int(pin())
  a=list(map(int,pin().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:
    for j in range(n):
      if j%2==0:
        b.appendleft(a[j])
      else:
        b.append(a[j])
  for k in range(n):
    pout(str(b[k]))
    if k!=n-1:
      pout(" ")
  pout("\n")
  return 
main()

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

b = [-1] * n
l = 0
r = n-1
for i in range(n-1, -1, -1):
    if i % 2:
        b[l] = a[i]
        l += 1
    else:
        b[r] = a[i]
        r -= 1

if n % 2:
    b.reverse()
b = [str(i) for i in b]
print(' '.join(b))

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