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

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

l.reverse()

ans = [0]*n
head = 0
tail = n-1
    
for i in range(n):
    if i % 2 == 0:
        ans[head] = l[i]
        head += 1
        
    else:
        ans[tail] = l[i]
        tail -= 1


for i in range(n):
    ans[i] = str(ans[i])

print(' '.join(ans))

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


for i in range(n-1):
    print(ans[i],end=" ")
print(ans[n-1])

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

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

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

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

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

def main():
  n=I()
  l=LI()

  if n==1:
    return l[0]

  cen=l[0]
  l.remove(cen)

  la=[]
  lb=[]
  for i in range(len(l)):
    if i%2==0:
      la.append(l[i])
    else:
      lb.append(l[i])

  if n%2==0:
    la.reverse()
    return ' '.join(str(x) for x in la)+' '+str(cen)+' '+' '.join(str(x) for x in lb)
  else:
    lb.reverse()
    return ' '.join(str(x) for x in lb)+' '+str(cen)+' '+' '.join(str(x) for x in la)

print(main())

Solution (Python):
import itertools
import math
N = int(input())
As = list(map(int,input().split(" ")))
ans = []
off = 0
if N%2 == 1:
    off = 1

for i in range(N-1,-1,-2):
    ans.append(As[i])
for i in range(off,N,2):
    ans.append(As[i])
ans = list(map(str,ans))
print(" ".join(ans))

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

even_lst = [A[i] for i in range(N) if i % 2 == 1]
odd_lst = [A[i] for i in range(N) if i % 2 == 0]

if N % 2 == 0:
  progression = even_lst[::-1] + odd_lst
else:
  progression = odd_lst[::-1] + even_lst

ans = ' '.join(list(map(str, progression)))
print(ans)

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

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

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

L = A[::2]
R = A[1::2]

print(*(L+R[::-1]))

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

odd = A[0::2]
even = A[1::2]

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

ans = map(str, ans)
print(" ".join(ans))

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

if(N==1):
    print(a[0])
elif(N%2==0):
    for i in range(N-1,-1,-2):
        print(a[i],end=' ')
    for i in range(0,N-2,+2):
        print(a[i],end=' ')
    print(a[N-2])
else:
    for i in range(N-1,-1,-2):
        print(a[i],end=' ')
    for i in range(1,N-2,+2):
        print(a[i],end=' ')
    print(a[N-2])

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

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

Solution (Python):
n = int(input())
num_list = [ v for v in input().split() ]

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

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
cnt=n-1
i=n
arg=[0]*n
while(cnt>=0):
     arg[n-i]=cnt
     cnt-=1
     if cnt<0:
          break
     arg[i-1]=cnt
     cnt-=1
     i-=1
b=[]
for idx in arg:
     b.append(str(a[idx]))
print(' '.join(b))

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

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

l = len(A)
b = [0]*N
for i, a in enumerate(A):
    if i % 2 == 0:
        b[(l//2) + (i//2)] = a
    else:
        b[(l//2) - (i//2) - 1] = a

if len(A) % 2 == 0:
    print(*b)
else:
    print(*b[::-1])

Solution (Python):
n,a=open(0);a=a.split();print(*a[::-2]+a[int(n)%2::2])

Solution (Python):
n,*a=map(int,open(0).read().split())
b=a[1::2][::-1]+a[::2]
print(*b[::n%2<1or-1])

Solution (Python):
n,*a=map(int,open(0).read().split())
b=a[1::2][::-1]+a[::2]
print(*b[::n%2<1or-1])

Solution (Python):
N, *a = map(int, open(0).read().split())
print(*(a[::-2] + a[N % 2::2]))

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
print(*reversed(a[(len(a)+1) % 2::2]), end=" ")
print(*a[len(a) % 2::2])

Solution (Python):
N = input()
A = [(i if i % 2 == 0 else -i, x) for i, x in enumerate(input().split())]
print(" ".join(map(lambda x: x[1], sorted(A, reverse=len(A)%2 ==1))))

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

Solution (Python):


import itertools
from collections import Counter
from collections import defaultdict
import bisect
import math
import heapq

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

    i = len(a) - 1
    while i >= 0:
        print(a[i], end=" ")
        i -= 2

    i = 1 if i == -2 else 0
    while i < len(a):
        print(a[i], end=" ")
        i += 2


if __name__ == '__main__':
    main()

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

if n%2 == 0:
    left = list(reversed(a[1::2]))
    right = a[::2]
    ans = left + right
else:    
    left = list(reversed(a[2::2]))
    right = a[1::2]
    ans = left +[a[0]]+ right
    
print(' '.join(map(str,ans)))

Solution (Python):










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


if n % 2 == 1:
    sidx = n - 2
else:
    sidx = n - 1


for i in range(sidx, -1, -2):
    ansl.append(a[i])


for i in range(0, n, 2):
    ansl.append(a[i])


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


ans = ""
for i in range(n):
    ans += ansl[i] + " "


print(ans)

Solution (Python):
N=int(input())
s=input().split(" ")
s1=[]
s2=[]
even=True
for z in s:
  if even:
    s1.append(z)
    even=False
  else:
    s2.append(z)
    even=True

if even:
  print(" ".join(s2[::-1]+s1))
else:
  print(" ".join(s1[::-1]+s2))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=[]
if n%2==0:
    for i in range(n-1,0,-2):
        ans.append(a[i])
    for i in range(0,n-1,2):
        ans.append(a[i])
else:
    for i in range(n-1,-1,-2):
        ans.append(a[i])
    for i in range(1,n-1,2):
        ans.append(a[i])
print(' '.join(map(str,ans)))

Solution (Python):
import collections
n=int(input())
arr=list(map(int,input().split()))
q=collections.deque()
for i in range(n):
  if i%2==0:
    q.append(arr[i])
  else:
    q.appendleft(arr[i])
if n%2==1:
  q=list(q)[::-1]
print(' '.join(map(str,q)))

Solution (Python):
import collections

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

b = collections.deque()
for i, v in enumerate(a):
    if i % 2 == 0:
        b.append(v)
    else:
        b.appendleft(v)

ans = ' '.join(map(str, b if n % 2 == 0 else reversed(b)))
print(ans)

Solution (Python):

from collections import deque

def solve():
    n = int(input())
    A = input().split()

    """方針
    A = 0 6 7 6 7 0
    i | b
    ---------------
    1 | 0
    2 | 0 6 (本当は逆で6 0)
    3 | 7 0 6
    4 | 7 0 6 6 (本当は逆で 6 6 0 7)
    5 | 7 7 0 6 6
    6 | 7 7 0 6 6 0 (本当は逆で0 6 6 0 7 7) 

    ・iが偶数のとき、bの後ろにA[i]を追加する
    ・iが奇数のとき、bの前にA[i]を追加する

    上の操作をn回すべてしたあとに、

    ・nが偶数なら答えを反転する
    ・nが奇数なら答えはそのまま

    ただし、A[i]は2桁以上の数字の可能性も考慮すること

    あとPythonは、list.insert()はとても遅いので（TLEしたので）、代わりにcollections.dequeを使用する

    ・collections.deque
    https://docs.python.org/ja/3/library/collections.html

    dequeとは、「両端における append や pop を高速に行えるリスト風のコンテナ」
    """

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

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


if __name__ == "__main__":
    solve()

Solution (Python):
import sys
input = sys.stdin.readline
from collections import deque

n = int(input())
s = input().split()
q = deque()

for i in range(n):
  if i%2 == 0:
    q.appendleft(s[i])
  else:
    q.append(s[i])
if n%2 == 0:
  q.reverse()
print(" ".join(q))

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

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

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

Solution (Python):
n=int(input())
a_list=[int(i) for i in input().split()]
odd=[a_list[i] for i in range(n) if i%2==1]
even=[a_list[i] for i in range(n) if i%2==0]

ans=[]
if n%2==1:
    even.reverse()
    ans=even+odd
else:
    odd.reverse()
    ans=odd+even
print(' '.join(map(str, ans)))

Solution (Python):
from collections import deque
q=deque()
r=int(input())%2
for x in map(int, input().split()):
	if r == 0:
		q.append(x)
	else:
		q.appendleft(x)
	r = 1 - r
print(" ".join(map(str, q)))

Solution (Python):


import math


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

if N%2 == 0:
  Bn = An[-1::-2] + An[0::2]
else:
  Bn = An[-1::-2] + An[1::2]

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

Solution (Python):
n = int(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)))

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

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

Solution (Python):
from collections import deque


n = int(input())
lst_a = list(map(int, input().split()))
b = deque([])


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


print(*b)

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

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

Solution (Python):
from collections import deque


n = int(input())
lst_a = list(map(int, input().split()))
b = deque([])


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


print(*b)

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

print(*A[::-2] + A[N % 2::2])

Solution (Python):
from collections import deque

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

print(*A[::-2] + A[N % 2::2])

Solution (Python):
from collections import deque

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

Q = deque()

for i, a in enumerate(A):
    if i % 2 == 0:
        Q.append(a)
    else:
        Q.appendleft(a)

if N % 2 == 1:
    Q.reverse()
print(*Q)

Solution (Python):

n = int(input())
a = list(map(int,input().split()))
b = [None]*n
j = 0
x = a[::2]
y = a[1::2]
if n % 2 == 1:
    x.reverse()
    x = x+y
    print(*x)
else:
    y.reverse()
    y = y + x
    print(*y)

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


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

print(*b)

Solution (Python):
import sys
from collections import deque
input = sys.stdin.readline
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.appendleft(A[i])
        else:
            ans.append(A[i])
else:
    for i in range(n):
        if i % 2 == 0:
            ans.append(A[i])
        else:
            ans.appendleft(A[i])

ans = list(ans)
ans.reverse()
ans = list(map(str, ans))
print(' '.join(ans))

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

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

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

mapB = map(str,B)
B = ' '.join(mapB)
print(B)

Solution (Python):
import sys
from collections import deque
input = sys.stdin.readline

N = int(input())
L = [int(v) for v in input().split()]
res = deque()

for i in range(N):
    if i % 2 == 0:
        res.append(str(L[i]))
    else:
        res.appendleft(str(L[i]))
        
if N % 2 == 0:
    print(" ".join(res))
else:
    print(" ".join(reversed(res)))

Solution (Python):

import pprint
n = int(input())
ai = list(map(int, input().split()))
bi = []
ran = 0
if n%2==0:
    for i in range(n//2):
        bi.append(ai[i+i+1])
    bi.reverse()
    for i in range(n//2):
        bi.append(ai[i+i])
else:
    for i in range(n//2+1):
        bi.append(ai[i+i])
    bi.reverse()
    for i in range(n//2):
        bi.append(ai[i+i+1])
        
for b in bi:
    print(b, end=" ")

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
"""
b = []
for i, a in enumerate(A):
	if not i % 2:
		b.append(a)
	else:	
		b.insert(0, a)

if not len(A) % 2:
	print(*b)
else:
	print(*b[::-1])
"""
print(*(A[::-2] + A[len(A) % 2::2]))

Solution (Python):
n = int(input())
a = input().split()
print(' '.join(a[::-2] + a[n%2::2]))

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

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

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

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

i = n - 1
while i >= 0:
    print(a[i], end=' ')
    i -= 2

if n % 2 == 1:
    i = 1
else:
    i = 0

while i <= n - 1:
    print(a[i], end=' ')
    i += 2

print()

Solution (Python):
n = int(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))

Solution (Python):
from collections import Counter
from functools import reduce

import bisect
import copy
import fractions
import math
import pprint
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) 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 MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers):
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))
def unite(x, y):
    
    x = root(x)
    y = root(y)
    if x == y:
        return
    
    node[x] = y
def same(x,y): return bool(root(x) == root(y))
def root(x):
    if node[x] == x:  
        return x
    else:
        node[x] = root(node[x])  
        return node[x]
def dfs(v):
    
    visited[v] = True
    for v2 in range(n):
        if graph[v][v2] == False:  
            continue
        if visited[v2] == True:  
            continue
        dfs(v2)


n = II()
a = LI()
length = len(a)
odd = [a[i] for i in range(length) if i % 2 == 0]
even = [a[i] for i in range(length) if i % 2 == 1]
if length % 2 == 0:
    print(' '.join(map(str, even[::-1])) + ' ' + ' '.join(map(str, odd)))
else:
    print(' '.join(map(str, odd[::-1])) + ' ' + ' '.join(map(str, even)))

Solution (Python):

from collections import deque

def read_input():
    n = int(input())
    alist = list(map(int, input().split()))

    return n, alist


def submit():
    n, alist = read_input()
    b = deque()

    if n % 2 == 0:
        side = 'right'
    else:
        side = 'left'

    for a in alist:
        if side == 'left':
            b.appendleft(a)
            side = 'right'
        else:
            b.append(a)
            side = 'left'


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


if __name__ == '__main__':
    submit()

Solution (Python):
from collections import deque
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
b = deque([])
flg = False
if n % 2 == 0:
    flg = True
for e in a:
    if flg:
        b.append(e)
        flg = False
    else:
        b.appendleft(e)
        flg = True
print(' '.join(map(str, b)))

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math


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

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

b.remove(0)
if n%2==0:
    b.reverse()

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

Solution (Python):
def c_pushpush(N, A):
    from collections import deque
    ans = deque([])  
    n_parity = N & 1
    for i, a in enumerate(A, 1):
        if n_parity == i & 1:
            ans.appendleft(a)
        else:
            ans.append(a)
    return ' '.join(map(str, ans))

N = int(input())
A = [int(i) for i in input().split()]
print(c_pushpush(N, A))

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)

n = ip()                                     

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








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

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

Solution (Python):
input();*A,=input().split();print(" ".join(A[::-2]+A[len(A)%2::2]))

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    a = f()

    b = [0] * n

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

        for i in b:
            print(i, end=' ')
    else:
        k = n//2+1
        for i in range(k):
            b[i] = a[n - i * 2-1]

        for i in range(k-1):
            b[k+i] = a[(i+1)*2-1]

        for i in b:
            print(i, end=' ')


solve()

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

odd = []
even = []

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

if n%2 == 0:
    odd.reverse()
    order = odd + even
else:
    even.reverse()
    order = even + odd

b = []
for i in order:
    b.append(a[i])
print(*b, sep=' ')

Solution (Python):
n = int(input())
a = input().split()
even = a[::2]
odd =a [1::2]

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

print(' '.join(b))

Solution (Python):
n=int(input())
a=input().split()
ans=""
for i in range(n-1,-1,-2):
  ans+=a[i]+" "
for i in range(n%2,n,2):
  ans+=a[i]+" "
print(ans)

Solution (Python):
import math
n = int(input())
a = list(map(int, input().split()))
res = [-1]*n
last = n-1
middle = math.ceil(n/2)
for i in range(middle):
    res[i] = str(a[last - 2*i])

for i in range(n//2):
    res[middle+i] = str(a[last - 2*(n//2)+i*2 + 1])
print(" ".join(res))

Solution (Python):
import sys
from collections import Counter
from sys import stdin
N = int(stdin.readline().rstrip())
A = [int(_) for _ in stdin.readline().rstrip().split()]
odds, evens = A[0::2], A[1::2]
if N % 2 == 0:
    evens = evens[::-1]
    print(' '.join(str(x) for x in evens+odds))
else:
    odds = odds[::-1]
    print(' '.join(str(x) for x in odds+evens))

Solution (Python):
import collections

n = int(input())
A = list(map(int, input().split()))
B = collections.deque(maxlen=n)
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 else list(B)[::-1]
print(' '.join(map(str, B)))

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    INF = float("inf")
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

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

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

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

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

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

import collections

b = collections.deque()

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

print(*b)

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==n%2:ans.append(a[i])
    else:ans.appendleft(a[i])
print(' '.join(map(str,ans)))

Solution (Python):
from collections import deque

n = int(input())

a = list(map(str, 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:
  b.reverse()
  
print(" ".join(b))

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

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

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

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-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 pf(s): return print(s, flush=True, end=" ")

N=_I()
A=LI()


for i in range(1,N+1,2):
	pf(A[-i])
if N%2==0:
    for i in range(0,N,2):
	    pf(A[i])
else:
	for i in range(1,N,2):
		pf(A[i])

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

Solution (Python):
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsl = lambda: 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))

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

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

Solution (Python):
import sys
fastinput=sys.stdin.readline
from collections import deque
N=int(input())
a=[int(i) for i in fastinput().split()]
result=deque()
for k,i in enumerate(a):
    if (N-k)%2:
        result.appendleft(i)
    else:result.append(i)
print(" ".join([str(i) for i in result]))

Solution (Python):
import sys
fastinput=sys.stdin.readline
from collections import deque
N=int(input())
a=fastinput().split()
result=deque()
for k,i in enumerate(a):
    if (N-k)%2:
        result.appendleft(i)
    else:result.append(i)
print(" ".join(result))

Solution (Python):
import sys
fastinput=sys.stdin.readline
N=int(input())
a=[int(i) for i in fastinput().split()]
result=[None]*N
if N%2:
    c=(N-1)//2
    for num,i in enumerate(a):
        r=(num+1)//2
        if num==0:
            result[c]=i
        else:
            if num%2:
                result[c+r]=i
            else:
                result[c-r]=i
else:
    for num,i in enumerate(a):
        d=(N-num-1)//2
        if num%2:
            result[d]=i
        else:
            result[N-1-d]=i
print(" ".join([str(j) for j in result]))

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


l=list(q)

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

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

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
e = [a[i] for i in range(n) if i % 2 == 1]
o = [a[i] for i in range(n) if i % 2 == 0]
if (n % 2 == 1):
    ans = o[::-1] + e
else:
    ans = e[::-1] + o
ans = [str(i) for i in ans]
ans = " ".join(ans)
print(ans)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
b1 = a[::2]
b2 = a[1::2]
if n%2==1:
    for i in range(len(b1)):
        print(b1[-i-1],end=' ')
    for i in range(len(b2)):
        print(b2[i],end=' ')
    print('')
else:
    for i in range(len(b2)):
        print(b2[-i-1],end=' ')
    for i in range(len(b1)):
        print(b1[i],end=' ')
    print('')

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