CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))
l = list(map(int,input().split()))

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

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

# Optimized solution
n = int(eval(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)))
# Original solution
import sys
read_=sys.stdin.buffer.readline

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

B=[A[0]]

cnt=0
for a in A[1:]:
    if cnt%2==0:
        B.insert(0,a)
        cnt+=1
        continue
    B.append(a)
    cnt+=1

if N%2==0:
    print((' '.join(B)))
else:
    print((' '.join(reversed(B))))

# Optimized solution
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)))
# Original solution
n = int(eval(input()))
a = [int(e) for e in input().split()]

ans = []
if n % 2 == 0:
    for e in a[n-1::-2]:
        ans.append(str(e))
    for e in a[0::2]:
        ans.append(str(e))
else:
    for e in a[n-1::-2]:
        ans.append(str(e))
    for e in a[1::2]:
        ans.append(str(e))
print((' '.join(ans)))

# Optimized solution
n = int(eval(input()))
a = [e for e in input().split()]

print((' '.join(a[n-1::-2] + a[n%2::2])))
# Original solution
def solve():
    N = int(eval(input()))
    A = input().split()
    b = []
    for i,a in enumerate(A):
        if i%2 == 0:
            b.append(a)
        else:
            b.insert(0, a)

    if N % 2 == 1:
        b.reverse()
    print((' '.join(b)))
    
solve()

# Optimized solution
def solve():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    b = []
    left = []
    right = []
    for i,a in enumerate(A):
        if i%2 == 0:
            right.append(a)
        else:
            left.append(a)
            # b.insert(0, a)

    if N % 2 == 1:
        right.reverse()
        b = right+left
    else:
        left.reverse()
        b = left + right
    print((' '.join(map(str, b))))
    
solve()
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
b1=[str(a[2*i]) for i in range(0,n//2)]
b2=[str(a[2*i+1]) for i in range(0,n//2)]
if n%2: b=[str(a[-1])]+list(reversed(b1))+b2
else: b=list(reversed(b2))+b1
print((" ".join(b)))

# Optimized solution
n=int(eval(input()))
a=input().split()
b1=[a[2*i] for i in range(0,n//2)]
b2=[a[2*i+1] for i in range(0,n//2)]
if n%2: b=[a[-1]]+list(reversed(b1))+b2
else: b=list(reversed(b2))+b1
print((" ".join(b)))
# Original solution
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    N = input().rstrip()
    a = list(int(_) for _ in input().split())
    b = []
    for i in range(len(a)):
        b.append(a[i])
        b = b[::-1]
    print((' '.join(str(_) for _ in b)))
    
if __name__ == '__main__':
    main()


# Optimized solution
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    N = int(input().rstrip())
    a = list(int(_) for _ in input().split())
    b = []
    for i in range(N):
        if((N-1)-i*2>0):
            b.append(a[(N-1)-i*2])
        else:
            b.append(a[max(0,i*2-N)])
    print((' '.join(str(_) for _ in b)))
    
if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
A = [int(i) for i in input().split()]
b = str(A[0])

for i in range(1, n):
    if i % 2 == n % 2:
        b += " " + str(A[i])
    else:
        b = str(A[i]) + " " + b

print(b)

# Optimized solution
n = int(eval(input()))
A = [int(i) for i in input().split()]

if n % 2 != 0:
    r = A[1::2]
    l = A[::2]
else:
    r = A[::2]
    l = A[1::2]
l.reverse()
print((" ".join(map(str, l + r))))
# Original solution
n=int(eval(input()))
a=input().split()
b=[]

for i in range(n):
    b.append(a[i])
    b.reverse()
print((' '.join(b)))


# Optimized solution
n=int(eval(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)
# Original solution
from collections import deque
n=int(input())
a=[int(i) for i in input().split()]
ans=deque([])
for i in a:
    ans.append(i)
    ans=list(reversed(ans))
print(*ans,sep=' ')


# Optimized solution
from collections import deque
n=int(input())
a=[int(i) for i in input().split()]
ans=deque([])
for i,j in enumerate(a):
    if n%2==i%2:
        ans.append(j)
    else:
        ans.appendleft(j)
print(*ans,sep=' ')
# Original solution
from collections import deque
N= eval(input())
a = input().split()
#print a

d=deque()
for i,val in enumerate(a):
	if i%2==1:
		d.append(val)
	else:
		d.appendleft(val)
else:
	#print d
	d_str=""
	if N%2==0:
		for j in range(N):
			d_str=d_str+d.pop()+" "
	else:
		for j in range(N):
			d_str=d_str+d.popleft()+" "		
	print(d_str[0:-1])

# Optimized solution
n= eval(input())
a = list(map(int,input().split()))
#print a

l=[ i for i in range(n)]
l_gusu=l[0::2]
l_kisu=l[1::2]

ans=[]
for i in reversed(list(l_gusu)):
	#print i,a[i]
	ans.append(a[i])

for i in l_kisu:
	ans.append(a[i])


ans_str=""
if n%2==0:
	for i in reversed(list(ans)):
		ans_str+=(str(i)+" ")
	print(ans_str.strip())
else:
	for i in ans:
		ans_str+=(str(i)+" ")
	print(ans_str.strip())
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))

b=[]
for i in range(n):
    if i%2==0:
        b.append(a[i])
    else:
        b.insert(0, a[i])
if n%2!=0:
    b.reverse()
print((' '.join(map(str,b))))


# Optimized solution
n=int(eval(input()))
a=list(map(int,input().split()))

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

print((' '.join(map(str,b))))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = []
for i in range(n):
  b.append(a[i])
  b = b[::-1]
  
b=[str(c) for c in b]
b=" ".join(b)
print(b)

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = []
m1 = n//2
if n%2==0:
  
  for i in range(m1):
    b.append(a[n-1-2*i])
  for i in range(m1):
    b.append(a[2*i])
else:
  
  for i in range(m1+1):
    b.append(a[n-1-2*i])
  for i in range(m1):
    b.append(a[1+2*i])
  
  
  
b=[str(c) for c in b]
b=" ".join(b)
print(b)
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = []
for i in range(n):
  if n % 2 == i % 2:
    b.append(a[i])
  else:
    b.insert(0, a[i])
b = [str(bb) for bb in b]
b = ' '.join(b)
print(b)

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
b1 = []
b2 = []
m = n % 2
for i in range(n):
  if i % 2 == m:
    b1.append(a[i])
  else:
    b2.append(a[i])
b2 = b2[::-1]
b = b2 + b1
b = [str(bb) for bb in b]
b = ' '.join(b)
print(b)
# Original solution
n = int(input().rstrip())
a = list(map(int, input().split()))
b = []
for i in range(n):
    b.append(a[i])
    b.reverse()
ans = list(map(str, b))
print(' '.join(ans))


# Optimized solution
n = int(input().rstrip())
a = list(map(int, input().split()))
a_odd = a[0::2]
a_even = a[1::2]
a_even.reverse()
a_even.extend(a_odd)
b = list(map(str, a_even))
if len(b) % 2 !=0:
    b.reverse()
print(' '.join(b))
# Original solution
n = int(eval(input()))
a  = list(input().split())
ans = a[0]
for i in range(1, n):
	if i%2==n%2:
		ans += " " + a[i]
	else:
		ans = a[i] + " " + ans
print(ans)

# Optimized solution
n=int(eval(input()))
a=list(input().split())
print((" ".join(a[::-2]+a[n%2::2])))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = []
for i in range(n):
    if i % 2 == 0:
        b.append(a[i])
    else:
        b.insert(0, a[i])
if n % 2 == 1:
    b.reverse()
print((" ".join(map(str, b))))

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = [0] * ((n + 1) // 2)
c = [0] * (n // 2)
for i in range(n):
    if i % 2 == 0:
        b[i // 2] = a[i]
    else:
        c[i // 2] = a[i]
if n % 2 == 0:
    c.reverse()
    s = c + b
else:
    b.reverse()
    s = b + c
print((" ".join(map(str, s))))
# Original solution
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: list(map(int, sys.stdin.readline().split()))
nl = lambda: list(nm())
nsl = lambda: list(map(str, sys.stdin.readline().split()))

n = ni()
a = nl()
ans = []
if n % 2 == 0:
    for i in range(n):
        if i % 2 == 0:
            ans.append(str(a.pop(0)))
        else:
            ans.insert(0, str(a.pop(0)))
else:
    for i in range(n):
        if i % 2 == 0:
            ans.insert(0, str(a.pop(0)))
        else:
            ans.append(str(a.pop(0)))
print((' '.join(ans)))


# Optimized solution
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: list(map(int, sys.stdin.readline().split()))
nl = lambda: list(nm())
nsl = lambda: list(map(str, sys.stdin.readline().split()))

n = ni()
a = collections.deque(nl())
ans = collections.deque()
if n % 2 == 0:
    for i in range(n):
        if i % 2 == 0:
            ans.append(str(a.popleft()))
        else:
            ans.appendleft(str(a.popleft()))
else:
    for i in range(n):
        if i % 2 == 0:
            ans.appendleft(str(a.popleft()))
        else:
            ans.append(str(a.popleft()))
print((' '.join(ans)))
# Original solution
n = int(eval(input()))
a = list(input().split())
b = []
for i in range(n):
    b.append(a[i])
    b = b[::-1]
print((' '.join(b)))

# Optimized solution
n = int(eval(input()))
a = list(input().split())
print((' '.join(a[::-2] + a[n%2::2])))
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
ans = ""
if N % 2 == 0:
  for i in range(N-1, -1, -2):
    ans += str(A[i])
    ans += " "
  for i in range(0, N, 2):
    ans += str(A[i])
    if i != N - 2:
      ans += " "
else:
  for i in range(N-1, -2, -2):
    ans += str(A[i])
    ans += " "
  for i in range(1, N, 2):
    ans += str(A[i])
    if i != N - 2:
      ans += " "
print(ans)

# Optimized solution
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("")
# Original solution
n = int(eval(input()))
lis = []
li = list(map(str,input().split()))
if n % 2 == 0:
    b = li[1::2]
    for m in range(n//2):lis.append(b[-(m + 1)])
    print((" ".join(lis[::] + li[::2])))
else:
    b = li[::2]
    for m in range((n//2)+1):lis.append(b[-(m + 1)])
    print((" ".join(lis[::]+li[1::2])))

# Optimized solution
n = int(eval(input()))
lis = list(map(str,input().split()))
li = lis[::2]
l = lis[1::2]

if n % 2 == 0:
  l = l[::-1]
  ans = l+li
  print((" ".join(ans)))
else:
  li = li[::-1]
  ans = li+l
  print((" ".join(ans)))
# Original solution
n = int(input())
a = [int(i) for i in input().split()]
b = []

for i in range(n):
    b.append(a[i])
    b.reverse()

for i in range(n):
    if i < n-1:
        print(b[i],end=" ")
    else:
        print(b[i])


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

b = a[n::-2]+a[::2] if n%2 == 0 else a[n::-2]+a[1::2]
for i in range(n):
    if i < n-1:
        print(b[i],end=" ")
    else:
        print(b[i])
# Original solution
n = int(eval(input()))
a = input().split()

b = []

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


if((n%2)==0):
    print((" ".join([i for i in b])))
else:
    print((" ".join([i for i in b[::-1]]))) 

# Optimized solution
n = int(eval(input()))
a = input().split()

b = [0]*n

if (n%2) == 0:
    for i in range(n):
        if(i<(n//2)):
            b[i] = a[n-(2*i)-1]
        else:
            b[i] = a[(i-(n//2))*2]
else:
    for i in range(n):
        if(i<(n//2)):
            b[i] = a[n-(2*i)-1]
        elif i == (n//2):
            b[i]= a[0]
        else:
            b[i] = a[(i-(n//2)-1)*2+1]


print((" ".join([i for i in b])))
# Original solution
n = int(input())
S = list(map(int, input().split()))
b=[]
if len(S)%2==0:
    for i in range(n):
        if i%2==0:
            b.append(S[i])
        else:
            b.insert(0, S[i])
else:
    for i in range(n):
        if i%2!=0:
            b.append(S[i])
        else:
            b.insert(0, S[i])
print(*b, sep=" ")


# Optimized solution
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=" ")
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

b = []
for i in range(n):
    b.append(a[i])
    b = b[::-1]
print((' '.join(map(str, b))))

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))

b = []
if n % 2 == 0:
    for i in range(n//2):
        b.append(a[-1-i*2])
    for i in range(n//2):
        b.append(a[i*2])
else:
    for i in range(n//2+1):
        b.append(a[-1-i*2])
    for i in range(0, n//2):
        b.append(a[1+i*2])
print((' '.join(map(str, b))))
# Original solution
N = int(eval(input()))
A = list(input().split())

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


print((' '.join(B)))

# Optimized solution
N = int(eval(input()))
A = list(input().split())

# B = [0 for i in range(N)]
med = N // 2
B = ['0' for i in range(N)]
fo = []
# for i in range(med, N):
#     fo.append
if N % 2 == 0:
    f_c = med
    for i in range(0, N, 2):
        B[f_c] = A[i]
        f_c += 1

    # print(f_c)
    # print(B)
    B = B[::-1]
    f_c = med
    for i in range(1, N, 2):
        B[f_c] = A[i]
        f_c += 1

    B = B[::-1]
    # print(B)
    print((' '.join(B)))

else:
    B[med] = A[0]
    f_c = med+1
    for i in range(1, N, 2):
        B[f_c] = A[i]
        f_c += 1
    # print(B)
    B = B[::-1]
    # print(B)
    f_c = med
    for i in range(0, N, 2):
        B[f_c] = A[i]
        f_c += 1

    B = B[::-1]
    print((' '.join(B)))
# Original solution
n = int(eval(input()))
A = list(map(int, input().split()))
L = []
for a in A:
  L.append(a)
  L.reverse()
s = str(L[0])
for i in range(1, len(L)):
  s = s + " " + str(L[i])
print(s)

# Optimized solution
n = int(eval(input()))
A = list(input().split())
B = ""
m = n//2
if n%2 == 0:
  for i in range(m):
    B += A[n-1-2*i]
    B += " "
  for i in range(m):
    B += A[i*2]
    B += " "
else:
  for i in range(m+1):
    B += A[n-1-2*i]
    B += " "
  for i in range(m):
    B += A[i*2+1]
    B += " "
print((B[:-1]))
# Original solution
n=int(eval(input()))
a=list(input().split())
if n==1:
  print((a[0]))
  exit()
bl=a[-1]
br=a[-2]
for i in range(2,n):
  if i%2==0:
    bl+=' '+a[-1-i]
  else:
    br=a[-1-i]+' '+br
bl+=' '+br
print(bl)

# Optimized solution
n=int(eval(input()))
a=list(input().split())
if n==1:
  print((a[0]))
  exit()
bl=[a[-1]]
br=[a[-2]]
for i in range(2,n):
  if i%2==0:
    bl.append(a[-1-i])
  else:
    br.append(a[-1-i])
m=len(br)
br=[br[-i-1] for i in range(m)]
bl[len(bl):len(bl)]=br
print((' '.join(bl)))
# Original solution
n = int(eval(input()))
a = [int(x) for x in input().split()]
b = []

for i in range(n):
    if n % 2 != i % 2:
        b.insert(0, a[i])
    else:
        b.append(a[i])
print((' '.join(map(str, b))))

# Optimized solution
n = int(eval(input()))
a = input().split()
a_odd = a[1::2]
a_even = a[0::2]

if n % 2 == 0:
    a_odd.reverse()
    ans = a_odd + a_even
else:
    a_even.reverse()
    ans = a_even + a_odd
print((' '.join(ans)))
# Original solution
n = int(eval(input()))
a = list(input().split())
b = []
for i in range(n):
  if i % 2 == 0:
    b.append(a[i])
  else:
    b.insert(0, a[i])
if n % 2 == 1:
  b.reverse()

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


# Optimized solution
n = int(eval(input()))
a = list(input().split())
b = []

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

print((" ".join(b)))
# Original solution
n = int(eval(input()))
listA = list(map(int, input().split()))
listB=[]

index=0
while index < n:
    a = listA[index]
    if index%2==0:
        listC=[a]
        listC.extend(listB)
        listB=listC
    else:
        listB.append(a)
    index+=1
if n%2==0:
    listB.reverse()

print((" ".join(list(map(str, listB)))))

# Optimized solution
n = int(eval(input()))
listA = list(map(int, input().split()))

stA=""
if n%2 == 0:
    index = len(listA)-1
    while index > 0:
        if index== len(listA)-1:
            stA +=str(listA[index])
        else:
            stA+=" "+str(listA[index])
        index-=2
    index = 0
    while index < len(listA)-1:
        stA+=" "+str(listA[index])
        index+=2
else:
    index = len(listA)-1
    while index > -1:
        if index == len(listA)-1:
            stA += str(listA[index])
        else:
            stA += " "+str(listA[index])
        index -= 2
    index = 1
    while index < len(listA)-1:
        stA += " "+str(listA[index])
        index += 2
        
print(stA)
# Original solution
n=int(eval(input()))
nums=input().split()
b=list()

for var in range(0,n):
    b.append(nums[var])
    b=b[::-1]

ans=" ".join(b)
print(ans)

# Optimized solution
n=int(eval(input()))
nums=input().split()
n1=nums[::2]
n2=nums[1::2]

if len(nums)%2==0:
    ans=" ".join(n2[::-1])+" "+" ".join(n1)
else:
    ans = " ".join(n1[::-1]) + " " + " ".join(n2)

print(ans)
# Original solution
def main():
    n = int(eval(input()))
    a = input().split()
    ans = []
    add = ans.append
    rev = ans.reverse
    for i in range(n):
        add(a[i])
        rev()
    print((" ".join(ans)))
if __name__=="__main__": main()

# Optimized solution
def main():
    n = int(eval(input()))
    a = input().split()
    if n%2: ans = a[n-1::-2] + a[1:n-1:2]
    else: ans = a[n-1:0:-2] + a[0:n-1:2]
    print((" ".join(ans)))
if __name__=="__main__": main()
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

index = []
if N % 2 == 0:
    for i in range(N - 1, 0, -2):
        index.append(i)
    for j in range(0, N - 1, 2):
        index.append(j)
else:
    for i in range(N - 1, -1, -2):
        index.append(i)
    for j in range(1, N - 1, 2):
        index.append(j)

B = []
for i in index:
    B.append(str(A[i]))
print((' '.join(B)))


# Optimized solution
N = int(eval(input()))
A = list(map(str, input().split()))

B = A[::2][::-1] + A[1::2]
if N % 2 == 0:
    B = B[::-1]
print((' '.join(B)))
# Original solution
N=int(eval(input()))
li=list(map(int,input().split()))
ans=[]
if N%2==0:
    for n in range(N):
        if n%2==0:
            ans.append(str(li[n]))
        else:
            ans.insert(0,str(li[n]))
else:
    for n in range(N):
        if n%2==0:
            ans.insert(0,str(li[n]))
        else:
            ans.append(str(li[n]))
print((' '.join(ans)))



# Optimized solution
N=int(eval(input()))
li=list(map(int,input().split()))
ans_odd=[]
ans_even=[]
if N%2==0:
    ans_normal=li[::2]
    ans_rev=li[1::2]
else:
    ans_rev=li[::2]
    ans_normal=li[1::2]  
ans_rev.reverse()
ans=ans_rev+ans_normal
for n in range(N):
    ans[n]=str(ans[n])
print((' '.join(ans)))
# Original solution
n = int(eval(input()))
a = []
for i in input().split():
  a.append(i)
  a = a[::-1]

print((" ".join(list(map(str, a)))))



# Optimized solution
n=int(eval(input()))
a=[i for i in 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])
else:
    for i in range(n):
        if i%2==0:
            c.append(a[i])
        else:
            b.append(a[i])
c=c[::-1]
print((" ".join(c)+" "+" ".join(b)))
# Original solution
#-*-coding:utf-8-*-

def main():
    n = int(eval(input()))
    a_list = list(map(int, input().split()))
    b = []

    for i in range(n):
        if i % 2 != 0:
            b.insert(0, a_list[i])
        else:
            b.append(a_list[i])
    if len(a_list) % 2 != 0:
        b = b[::-1]
    print((' '.join(map(str, b))))


if __name__ == '__main__':
    main()

# Optimized solution
#-*-coding:utf-8-*-

def main():
    n = int(eval(input()))
    a_list = list(map(int, input().split()))
    p = [a_list[i] for i in range(0, n, 2)]
    q = [a_list[i] for i in range(1, n, 2)]

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

if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
a = input().split()
b = []
if n % 2:
    for i in range(n):
        if i % 2 == 0:
            b = [a[i]] + b
        else:
            b.append(a[i])
    print((" ".join(b)))
else:
    for i in range(n):
        if i % 2:
            b = [a[i]] + b
        else:
            b.append(a[i])
    print((" ".join(b)))

# Optimized solution
n = int(eval(input()))
a = input().split()
if n % 2 == 0:
    b = a[::-2] + a[::2]
else:
    b = a[::-2] + a[1::2]
print((" ".join(b)))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = []
for i in range(n):
	b.append(a[i])
	b = b[:: -1]
print((" ".join(map(str, b))))


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = []
if n % 2 == 0:
	b = a[1:: 2][:: -1] + a[:: 2]
	print((" ".join(map(str, b))))
else:
	b = a[:: 2][:: -1] + a[1:: 2]
	print((" ".join(map(str, b))))