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-----
4
1 2 3 4

-----Sample Output-----
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.

Difficulty: introductory

Starter code:

Solutions:
n = int(input())
a = list(map(int, input().split()))
o = [a[i] for i in range(0,n,2)]
e = [a[h] for h in range(1,n,2)]
if n%2 == 0:
    e.reverse()
    l = e + o
    print(*l)
else:
    o.reverse()
    l = o + e
    print(*l)

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

#!/usr/bin/env python3
import queue


def main():
    n = int(input())
    a = list(map(int, input().split()))
    q = queue.deque()
    for i in range(n):
        if i % 2 == 1:
            q.appendleft(a[i])
        else:
            q.append(a[i])
    if n % 2 == 1:
        q.reverse()
    print(*q, sep=" ")


def __starting_point():
    main()

__starting_point()

n = int(input())
a = list(map(str, input().split()))
b = []
'''
b = [str(a[0])]
if (n == 1):
    print(a[0])
    return

a = a[1:]

for i in a:
    b.append(str(i))
    b.reverse()
'''
'''
loop = int(n / 2)
loop_rest = n - loop

for i in range(loop):
    tar_index = (n - 1) - 2 * i
    tar = a[tar_index]

    b.append(str(tar))


if (n % 2 == 0):
    tar_index = 0
else:
    tar_index = 1

for i in range(loop_rest):
    b.append(str(a[tar_index]))
    tar_index += 2
'''

# 一つおきでListを取る場合。
# a[0::2]
# 1つ目：起点。
# 2つ目：Step

# a[::-1]
# > -1step,つまりReverse

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


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)

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

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


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==1:
            ans.appendleft(a[i])
        else:
            ans.append(a[i])
else:
    for i in range(n):
        if i%2==0:
            ans.appendleft(a[i])
        else:
            ans.append(a[i])

ans = list(ans)
print((*ans))


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

from collections import deque
n = int(input())
a = list(map(int,input().split()))
ans = deque()
check = n % 2
for i in range(len(a)):
  if (i + check) % 2 == 0:
    ans.append(a[i])
  else:
    ans.appendleft(a[i])
print(*ans)

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


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



def __starting_point():
    main()

__starting_point()

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

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

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)

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

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


def __starting_point():
    main()

__starting_point()

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


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

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)


def __starting_point():
    n = int(input())
    a = list(map(int, input().split()))
    print((' '.join(solve(a))))

__starting_point()

n,a=int(input()),list(map(int,input().split()))
print(*[a[1::2][::-1]+a[::2],a[::2][::-1]+a[1::2]][n%2],sep=' ')

from collections import deque

n = int(input())
a = deque(list(map(int, input().split())))
b = deque() if n % 2 == 0 else deque([a.popleft()])
for _ in range(n // 2):
    b.append(a.popleft())
    b.appendleft(a.popleft())
print(*b)

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

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

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

# even
if (n - 1) % 2 == 0: # 0-(n-1)の実施なので(n-1)の偶奇を判定
    b = a_even.copy()
    b.reverse()
    b = b + a_odd
# odd
else:
    b = a_odd.copy()
    b.reverse()
    b = b + a_even

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

#https://atcoder.jp/contests/abc066/tasks/arc077_a
N = int(input())
N_List = list(map(str,input().split()))
if N % 2 == 0:
    ans = ' '.join(reversed(N_List[1::2])) + ' ' + ' '.join(N_List[::2])
else:
    ans = ' '.join(reversed(N_List[::2])) + ' ' + ' '.join(N_List[1::2])

print(ans)

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


import collections

def f(myList):
    ans = ''
    if len(myList)%2==0:
        for i in range(len(myList)):
            ans += str(myList[i]) + ' '
    else:
        for i in range(len(myList)):
            ans += str(myList[-(i+1)]) + ' '
    return ans[:-1]

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


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])
B = list(B)        
if n%2 != 0:
    B = B[::-1]
print((*B))



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

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

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)

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)

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	C_fix
# CreatedDate:  2020-10-08 14:55:40 +0900
# LastModified: 2020-10-08 15:22:52 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


def main():
    N = int(input())
    A = list(map(int, input().split()))
    i = N-1

    if N % 2 == 1:
        while i < N:
            if i == N-1:
                print("{}".format(A[i]), end='')
            else:
                print(" {}".format(A[i]), end='')
            if i == 0:
                i += 1
                continue
            if i % 2 == 0:
                i -= 2
            else:
                i += 2

    else:
        while i < N:
            if i == N-1:
                print("{}".format(A[i]), end='')
            else:
                print(" {}".format(A[i]), end='')
            if i == 1:
                i -= 1
                continue
            if i % 2 == 0:
                i += 2
            else:
                i -= 2
    print()


def __starting_point():
    main()

__starting_point()

import sys 
from collections import deque
N = int(input())
A = list(map(int, input().split()))


if N == 1:
    print((A[0]))
    return

mae = deque()
usiro = deque()

#0の時に前 1の時に後ろ
Flag = 0

for i in reversed(list(range(0,N,1))):
    
    if Flag == 0: # 前の時
        mae.append(str(A[i]))
        mae.append(" ")
        Flag = 1
    else:
        usiro.insert(0,str(A[i]))
        usiro.appendleft(" ")
        Flag = 0

moziretu = (mae + usiro)
del moziretu[((len(moziretu))//2)]
moziretu = ''.join(moziretu)
print(moziretu)
  
  




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

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

from collections import deque

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

b=deque()
for n in range(N):
    if n%2==0:
        b.append(a[n])
    else:
        b.appendleft(a[n])
ans=" ".join(list(map(str,b))) if n%2==1 else " ".join(list(map(str,list(deque(b))[::-1])))
print(ans)

n = int(input())
a = list(map(int, input().split()))
o = [a[i] for i in range(2,n,2)]
e = [a[h] for h in range(1,n,2)]
if n%2 == 0:
    e.reverse()
    l = e + [a[0]] + o
    print(*l)
else:
    o.reverse()
    l = o + [a[0]] + e
    print(*l)

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)

#44 C - pushpush AC
n = int(input())
a = list(map(int,input().split()))

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

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

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)

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


from collections import deque
n=int(input())
a=[int(x) for x in input().rstrip().split()]

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

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


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

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

if n == 1:
  print(A[0])
else:
  odd = A[::2]
  even = A[1::2]
  if n % 2 == 0:
    even.reverse()
    print(" ".join(even + odd))
  else:
    odd.reverse()
    print(" ".join(odd + even))

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

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


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

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

b = [0]*N 

if N % 2 == 0:
    even = N//2
    odd = even - 1
    for i in range(N):
        if i % 2 == 0:
            b[even] = str(a[i])
            even += 1
        else:
            b[odd] = str(a[i])
            odd -= 1
else:
    even = N//2
    odd = even + 1
    for i in range(N):
        if i % 2 == 0:
            b[even] = str(a[i])
            even -= 1
        else:
            b[odd] = str(a[i])
            odd += 1

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


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)

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

# 0
# 1, 0
# 2, 0, 1
# 3, 1, 0, 2
# 4, 2 ,0, 1, 3

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

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

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

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


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

q = a[::2]
p = a[1::2]

if n%2 == 0:
  print(*p[::-1],*q)
else:
  print(*q[::-1],*p)

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

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


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(*b)
else:
  print(*reversed(b))

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

if N%2==0:
    print(' '.join(map(str,A[1::2][::-1]+A[::2])))
else:
    print(' '.join(map(str,A[::2][::-1]+A[1::2])))

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


from collections import deque
n = int(input())
a = list(map(int, input().split()))
b = deque()
reverse = 1
for i in range(n):
    if reverse == 1:
        b.append(a[i])
        reverse *= -1
    else:
        b.appendleft(a[i])
        reverse *= -1

b_list = list(b)
if reverse == 1:
    print(*b_list)
else:
    print(*b_list[::-1])

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


from collections import deque

n = int(input())
a = list(map(int, input().split()))
b = deque()
flip = False
for i, x in enumerate(a):
  if flip:
    b.appendleft(x)
  else:
    b.append(x)
  flip = not flip

if flip:
  b = list(reversed(b))
print(*b)  

# -*- coding: utf-8 -*-
"""
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)))

from collections import deque
n = int(input())
#a, b, c = map(int, input().split())
al = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

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


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


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


def __starting_point():
    main()

__starting_point()

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

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

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


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

if n % 2 == 0:
  i = n-1
  while i >= 0:
    b.append(a[i])
    i -= 2
  i = 0
  while i < n:
    b.append(a[i])
    i += 2
else:
  i = n-1
  while i >= 0:
    b.append(a[i])
    i -= 2
  i = 1
  while i < n:
    b.append(a[i])
    i += 2

b = [str(x) for x in b]
print(" ".join(b))

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

l = []
if n % 2 == 1:
    i = n-1
    while i >= 0:
        l.append(a[i])
        i -= 2

    j = 1
    while j < n:
        l.append(a[j])
        j += 2
else:
    i = n-1
    while i >= 0:
        l.append(a[i])
        i -= 2

    j = 0
    while j < n:
        l.append(a[j])
        j += 2

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


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


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)

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)

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)


def __starting_point():
    main()
__starting_point()

n = int(input())
a_list = [int(x) for x in input().split()]
b = []
c = []
for i, a in enumerate(a_list):
    if i % 2 == 0:
        b.append(a)
    else:
        c.append(a)
if n % 2 == 0:
    d = list(reversed(c)) + b
else:
    d = list(reversed(b)) + c
print(*d)

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

# coding: utf-8
import math
from collections import deque
n = int(input())
#x, y = map(int,input().split())
A = list(map(int,input().split()))
ans = 0
B = deque()
if n%2==0:
    for i in range(n):
        a=str(A[i])
        if i%2==1:
            B.appendleft(a)
        else:
            B.append(a)
if n%2==1:
    for i in range(n):
        a=str(A[i])
        if i%2==0:
            B.appendleft(a)
        else:
            B.append(a)
print(' '.join(B))

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

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)

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


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)  
   
 



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

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


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


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

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

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

from collections import deque
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return list(map(int, stdin.readline().split()))
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    A = nl()
    A = deque(A)
    B = deque()
    if n % 2 == 0:
        while A:
            B.append(A.popleft())
            B.appendleft(A.popleft())
        B = list(B)
        print((*B))
    else:
        while len(A) != 1:
            B.append(A.popleft())
            B.appendleft(A.popleft())
        B.append(A.popleft())
        B = list(B)[::-1]
        print((*B))


def __starting_point():
    main()

__starting_point()

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

# 0
# 1, 0
# 2, 0, 1
# 3, 1, 0, 2
# 4, 2 ,0, 1, 3

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)

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)

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


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

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

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

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

from collections import deque
n = int(input())
a = list(map(int,input().split()))
b_1 = deque()
b_2 = deque()
switch = 0
for i in a:
    if switch == 0:
        b_1.append(i)
        b_2.appendleft(i)
        switch = 1
    else:
        b_2.append(i)
        b_1.appendleft(i)
        switch = 0
b_1 = list(b_1)
b_2 = list(b_2)
if switch == 0:
    print((' '.join(list(map(str,b_1)))))
else:
    print((' '.join(list(map(str,b_2)))))