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

Solution (Python):
n = int(input())
a = [i for i in input().split()]
outStr = []
if n % 2 == 0:
    for i in reversed(range(int(n/2))):
        outStr += [a[int(i * 2)+1]]
    for i in range(int(n/2)):
        outStr += [a[int(i*2)]]
    print(" ".join(outStr))
else:
    for i in reversed(range(int(n/2)+1)):
        outStr += [a[int(i*2)]]
    for i in range(int(n/2)):
        outStr += [a[int(i*2)+1]]
    print(" ".join(outStr))

Solution (Python):
n = int(input())
a_list = list(map(int, input().split()))
a1_list = []
a2_list = []
n_list = [0]*n
if n % 2 == 0:
    for i in range(n):
        if i % 2 == 0:
            a1_list.append(a_list[i])
        else:
            a2_list.append(a_list[i])
    for i in reversed(a2_list):
        print(i, end="")
        print(" ", end="")
    for i in a1_list:
        if i != a1_list[int((n-2)/2)]:
            print(i, end="")
            print(" ", end="")
        else:
            print(i)
else:
    for i in range(1,n):
        if i % 2 == 0:
            a1_list.append(a_list[i])
        else:
            a2_list.append(a_list[i])
    for i in reversed(a1_list):
        print(i, end="")
        print(" ", end="")
    print(a_list[0], end="")
    print(" ", end="")
    for i in a2_list:
        if i != a2_list[int((n-2)/2)]:
            print(i, end="")
            print(" ", end="")
        else:
            print(i)

Solution (Python):

from collections import deque
n = input()
dq = deque()
arr = map(int,raw_input().split())
dq.append(arr[0])
ff = 1
for i in range(1,n):
	if ff:
		dq.append(arr[i])
		ff ^= 1
	else:
		dq.appendleft(arr[i])
		ff ^= 1
if ff:
	for i in range(n):
		print dq[i],
else:
	for i in reversed(range(n)):
		print dq[i],

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
if N % 2 == 0:
    ans = A[::-2]+A[::2]
else:
    ans = A[::-2]+A[1::2]
    
for i in ans:
    print(str(i)+' ', end='')

Solution (Python):
from collections import deque

n = int(input())
num_list = list(map(int,input().split()))
dq =deque()

for i in range(len(num_list)):
    if i%2 == (n-1)%2:
        dq.appendleft(num_list[i])
    else:
        dq.append(num_list[i])

ans = [str(i) for i in dq]
print(' '.join(ans))

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

Solution (Python):
class Cell:
    def __init__(self, entity, next, prev):
        self.entity = entity
        self.next = next
        self.prev = prev


n = int(input())
A = list(map(int, input().split()))
cell = Cell(A[0], None, None)
top = cell
last = cell

cnt = 0
for i in range(1, len(A)):
    cnt += 1
    if i % 2 == 0:
        tmp = last
        last = Cell(A[i], None, last)
        tmp.next = last
    else:
        tmp = top
        top = Cell(A[i], top, None)
        tmp.prev = top

b = []
cell = top
while(True):
    b.append(cell.entity)
    if not(cell.next):
        break
    cell = cell.next
if n % 2 == 1:
    b.reverse()
print(' '.join(map(str, b)))

Solution (Python):
n = int(input())
A = list(map(int,input().split()))
A_o,A_e = [],[]
for i in range(n):
    if i % 2 == 0:
        A_o.append(A[i])
    if i % 2 == 1:
        A_e.append(A[i])
if n % 2 == 1:
    B = list(reversed(A_o)) + A_e
elif n % 2 == 0:
    B = list(reversed(A_e)) + A_o
for e in B:
    print(e,"",end = "")

Solution (Python):

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

b = [0] * n

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

if n % 2: print(" ".join(list(map(str, b))))
else:print(" ".join(list(map(str, reversed(b)))))

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

x,y = [],[]
for i in range(1,n+1):
    if i % 2 == 0:
        x.append(a[i-1])
    else:
        y.append(a[i-1])
if n % 2 == 0:
    print(" ".join(map(str,x[::-1])), " ".join(map(str,y)))
else:
    print(" ".join(map(str,y[::-1])), " ".join(map(str,x)))

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
ANS = ["" for i in range(N)]

if N % 2 == 0 :
    for i in range(N) :
        if i % 2 == 0 :
            ANS[(N+i)//2] = str(L[i])
        else :
            ANS[(N-i)//2] = str(L[i])
else :
    for i in range(N) :
        if i % 2 != 0 :
            ANS[(N+i)//2] = str(L[i])
        else :
            ANS[(N-i)//2] = str(L[i])
        
print(" ".join(ANS))

Solution (Python):
a = int(input())
ar = input().split(" ")
br = [0 for i in range(a)]
n = a // 2
p = 0
if a % 2 == 0:
    t = "L"
else:
    t = "R"
for i,r in enumerate(ar):
    if i == 0:
        br[n] = r
        p += 1
    else:
        if t == "L":
            br[n-p] = r
            t = "R"
            if a % 2 != 0:
                p += 1
        else:
            br[n+p] = r
            t = "L"
            if a % 2 == 0:
                p += 1
print(" ".join(br))

Solution (Python):
n = int(input())
a = input().split()
ans1 = a[1::2]
ans2 = a[0::2]
ans1.reverse()
ans = ans1 + ans2
if n % 2 == 1:
    ans.reverse()

print(' '.join(ans))

Solution (Python):
from collections import deque

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

B = deque(maxlen=2*10**5)

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

print(*B)

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

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

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

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

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

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

ans = str(b[0])
for i in range(n-1):
    ans += " " + str(b[i+1])
print(ans)

Solution (Python):
iN = int(input())
aA = input().rstrip().split()


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

Solution (Python):
iN = int(input())
aA = [int(_) for _ in input().split()]


if iN == 1:
    print(aA[0])
else:
    print(" " .join([str(_) for _ in aA[-1::-2] + aA[iN%2::2] ]))

Solution (Python):
iN = int(input())
aA = [int(_) for _ in input().split()]


if iN == 1:
    print(aA[0])
elif iN % 2 == 0:
    print(" " .join([str(_) for _ in list(reversed(aA[1::2])) + aA[0::2] ]))
else:
    print(" " .join([str(_) for _ in list(reversed(aA[0::2])) + aA[1::2] ]))

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

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

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

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.reverse()
lim = int(N/2)
if N%2 == 0:
    for i in range(lim):
        print(str(L[2*i]) + ' ', end="")

    L.reverse()
    for i in range(int(N/2)):
        print(str(L[2*i]) + ' ', end="")
else:
    lim += 1
    for i in range(lim):
        print(str(L[2*i]) + ' ', end="")

    L.reverse()
    for i in range(int(N/2)):
        print(str(L[2*i+1]) + ' ', end="")

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

if n % 2 != 0:
    r, l = a[1::2], a[::2]
else:
    r, l = a[::2], a[1::2]

l.reverse()
print(' '.join(l + r))

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


a_1 = a[0::2]
a_2 = a[1::2]
if N % 2 == 0:
	ans_list = a_2[::-1] + a_1
else:
	ans_list = a_1[::-1] + a_2

ans = ''
for i in range(N):
	if i == N-1:
		ans += str(ans_list[i])
	else:
		ans += str(ans_list[i]) + ' '
print(ans)

Solution (Python):

n = int(input())
a = list(map(int, input().split()))
b = [None for _ in range(n)]

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

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

Solution (Python):
def split_and_change(N, Array):
    Arr1 = Array[0::2]
    Arr2 = Array[1::2]
    if N % 2 == 0:
        return Arr2[::-1] + Arr1
    else:
        return Arr1[::-1] + Arr2
    
print(" ".join(split_and_change(int(input()), input().split())))

Solution (Python):
def split_and_change(N, Array):
    Arr1 = [a for ind, a in enumerate(Array) if ind % 2 == 0]
    Arr2 = [a for ind, a in enumerate(Array) if ind % 2 != 0]
    if N % 2 == 0:
        return Arr2[::-1] + Arr1
    else:
        return Arr1[::-1] + Arr2
    
print(" ".join(split_and_change(int(input()), list(map(str, input().split())))))

Solution (Python):
N, = map(int, raw_input().split())
a  = raw_input().split()
b  = []
for i in range(N-1, -1, -2):
  b.append(a[i])
for i in range(N%2, N, 2):
  b.append(a[i])
print " ".join(b)

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

l1 = []
l2 = []
for i, c in enumerate(b):
    if i%2 == 0:
        l1.append(c)
    else:
        l2.append(c)

l2.reverse()
answer = l2 + l1
if n%2 == 1:
    answer.reverse()
answer = list(map(str, answer))
print(' '.join(answer))

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

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

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

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

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

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

Solution (Python):
N=int(input())
L=list(map(str,input().split()))
L1=[]
L2=[]

for i in range(N):
    if i%2==0:
        L1.append(L[i])
    else:
        L2.append(L[i])
if N%2==0:
    L2=L2[::-1]
    ans=" ".join(L2)
    ans=ans+" "+" ".join(L1)
    print(ans)
else:
    L1=L1[::-1]
    ans=" ".join(L1)
    ans=ans+" "+" ".join(L2)
    print(ans)

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

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

s = []

for i in range(n):
	s.append(0)

if n%2==1:
	for i in range(n//2+1):
		s[i]=a[-1-2*i]
	for i in range(n//2):
		s[n//2+1+i]=a[2*i+1]
else:
	for i in range(n//2):
		s[i]=a[-1-2*i]
	for i in range(n//2):
		s[n//2+i]=a[2*i]
s = map(str,s)
print(" ".join(s))

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

for i in range(0,n):
    list_b[i] = str(list_b[i])
print(" ".join(list_b))

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

Solution (Python):


INF = float('inf')


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


N = int(input())
A = inpl()

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

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

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

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

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

Solution (Python):
n = int(input())
a = list(map(str, input().split()))
if n % 2 == 0:
    ki = a[::2]
    gu = a[1::2]
    gu = gu[::-1]
    ans = gu+ki
else:
    ki = a[::2]
    ki = ki[::-1]
    gu = a[1::2]
    ans = ki+gu
    
print(' '.join(ans))

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

b = [0 for _ in range(10*n)]
ind = 10*n // 2
ind_up = ind-1
ind_dw = ind
tmp = -1
for i in range(n):
    tmp *= -1
    if tmp == 1:
        ind_up += 1
        b[ind_up] = A[i]
    else:
        ind_dw -= 1
        b[ind_dw] = A[i]


if n%2 != 0:
    b = b[::-1]
    dw = ind_dw - 1
    up = ind_up
else:
    dw = ind_dw
    up = ind_up + 1

for i in range(dw,up):
    print(b[i],end = ' ')
print()

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

if n%2 == 0:
    ans1 = [a[i-1] for i in reversed(range(2,n+1,2))]
    ans2 = [a[i-1] for i in range(1,n+1,2)]
    ans = ans1 + ans2
else:
    ans1 = [a[i-1] for i in reversed(range(1,n+1,2))]
    ans2 = [a[i-1] for i in range(2,n+1,2)]
    ans = ans1 + ans2
    
print(*ans, sep=' ')

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

Solution (Python):
n = int(input())
s = input().split()
a = []
b = []
for i in range(n//2):
    b.append(s[i*2+1])
s = s[::2]
if n%2 == 0:
    b.reverse()
    print(" ".join(b+s))
else:
    s.reverse()
    print(" ".join(s+b))

Solution (Python):
import sys
stdin = sys.stdin

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

from collections import deque

n = ni()
a = list(li())

ans = deque([])
for i, ai in enumerate(a):
    if i%2 == 0:
        ans.append(ai)
    else:
        ans.appendleft(ai)
        
if n%2 == 1:
    print(*list(ans)[::-1])
else:
    print(*list(ans))

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

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

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

ans = list(reversed(src[1::2])) + src[::2]
if N%2:
    ans.reverse()
print(*ans)

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

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

B0=[A[i] for i in range(0,n,2)]
B1=[A[i] for i in range(1,n,2)]

if n%2==0:
    C=B1[::-1]+B0

else:
    C=B0[::-1]+B1

for j in C:
    print(j,end=" ")

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

Solution (Python):
n = int(input())
a = 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 defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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

    que = deque()
    for i in range(N):
        if i % 2 == 0:
            que.append(A[i])
        else:
            que.appendleft(A[i])

    if N % 2 == 1:
        que.reverse()
    print(*que, sep=" ")

    
if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a = list(input().split())
l, r = [], []
for i, ai in enumerate(a):
    if i % 2 == 0:
        r.append(ai)
    else:
        l.append(ai)
if n % 2 == 0:
    print(" ".join(l[::-1]) + " " + " ".join(r))
else:
    print(" ".join(r[::-1]) + " " + " ".join(l))

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

ans = []
for a in A[::2]:
    ans.append(a)
ans = ans[::-1]
for a in A[1::2]:
    ans.append(a)
print(*(ans if len(ans) & 1 else ans[::-1]))

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

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

b_list_even = []
b_list_odd = []
for i, a in enumerate(a_list , start=1):
    if i % 2 == 0:
        b_list_even.append(a)
    else:
        b_list_odd.append(a)


if n % 2 != 0:
    b_list_odd.reverse()
    b_list = b_list_odd + b_list_even
else:
    b_list_even.reverse()
    b_list = b_list_even + b_list_odd

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

Solution (Python):

n=int(input())
a=list(map(int, input().split()))
flg=n%2
half=n//2
front=[0]*(half+flg)
back=[0]*(half)
for i in range(half):
    front[half+flg-1-i]=a[2*i-flg+1]
    back[i]=a[2*i+flg]
if flg==1:
    front[0]=a[n-1]
print(' '.join(map(str, front+back)))

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

if n % 2 == 0:
    back = [A[2 * i] for i in range(n // 2)]
    front = [A[2 * i + 1] for i in range(n // 2)][::-1]
    ans = front + back

else:
    back = [A[2 * i + 1] for i in range(n // 2)]
    center = [A[0]]
    front = [A[2 * i + 2] for i in range(n // 2)][::-1]
    ans = front + center + back

ans = [str(i) for i in ans]
print(" ".join(ans))

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

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

ans = []
if N % 2 == 0:
  ans = A[N-1:0:-2] + A[0:N:2]
else:
  ans = A[N:0:-2] + A[0:1] + A[1:N-1:2]

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

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

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

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return




dp = None


def main():
    N = int(input())
    A = li_input()

    B = [-1] * N

    l = 0
    r = N - 1
    i = N - 1

    while l < r:
        B[l] = A[i]
        B[r] = A[i - 1]
        l += 1
        r -= 1
        i -= 2

    if l == r:
        B[l] = A[0]

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


main()

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

Solution (Python):
from collections import deque
n = int(input())
A = list( map( int, input().split()))
B = deque()
reverse = 0
for i in range(n):
    if reverse == 0:
        B.append(A[i])
        reverse = 1
    else:
        B.appendleft(A[i])
        reverse = 0
B = list(B)
if reverse == 1:
    B = B[::-1]
for i in range(n-1):
    print(B[i], end = ' ')
print(B[n-1])

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
O = []
E = []
def inv(X):
    X_new = []
    for i in range(len(X)):
        X_new.append(X[len(X)-i-1])
    return X_new
for i in range(N):
    if i % 2 == 0:
        O.append(A[i])
    else:
        E.append(A[i])
if N % 2 == 0:
    print(' '.join(map(str, inv(E)+O)))
else:
    print(' '.join(map(str, inv(O)+E)))

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

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

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

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

print(str(res).replace(',','')[1:-1])

Solution (Python):
from collections import deque

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

b = deque()

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

if n % 2 == 0:
    b = reversed(b)

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

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

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

if n % 2 == 0:
    ind_1 = [2*i for i in range(1, n//2+1)][::-1]
    b_front = [str(a[i-1]) for i in ind_1]
    ind_2 = [2*i-1 for i in range(1, n//2+1)]
    b_back = [str(a[i-1]) for i in ind_2]
    b = b_front + b_back
    print(' '.join(b))
else:
    ind_1 = [2*i-1 for i in range(1, n//2+2)][::-1]
    b_front = [str(a[i-1]) for i in ind_1]
    ind_2 = [2*i for i in range(1, n//2+1)]
    b_back = [str(a[i-1]) for i in ind_2]
    b = b_front + b_back
    print(' '.join(b))

Solution (Python):
from collections import deque
n = int(input())
a = list(map(int, input().split()))
b = deque()
for i, ai in enumerate(a):
    if i % 2 == 0:
        b.appendleft(ai)
    else:
        b.append(ai)
if n % 2 == 0:
    print(*reversed(b))
else:
    print(*b)

Solution (Python):


def main():
    n = int(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()

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
p = [a[i] for i in range(0, n, 2)]
q = [a[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)))

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

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
m=[]
for i in range(n-1,-1,-2):
  m.extend([str(l[i])])
for i in range(n%2,n,2):
  m.extend([str(l[i])])
print(" ".join(m))

Solution (Python):

from collections import defaultdict
import sys,heapq,bisect,math,itertools,string
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
AtoZ = [chr(i) for i in range(65,65+26)]
atoz = [chr(i) for i in range(97,97+26)]

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

n = int(input())
aa = inpl_int()

b = []

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

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

Solution (Python):
def inpl(): return input().split()

n = int(input())
a = inpl()
l = sorted(range(n), reverse=True)[::2]
r = list(range(n % 2, n))[::2]
ret = list(a[i] for i in (l + r))
print(' '.join(ret))

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
odd, even = [], []
for i, elem in enumerate(a):
    if i % 2 == 0:
        odd.append(elem)
    else:
        even.append(elem)
if n % 2 == 0:
    print(" ".join(map(str, even[::-1])), end=" ")
    print(" ".join(map(str, odd)))
else:
    print(" ".join(map(str, odd[::-1])), end=" ")
    print(" ".join(map(str, even)))

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

if n%2==0:
    print(' '.join(map(str, cr+b)))
else:
    print(' '.join(map(str, cr + c)))

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

arr = map(int,raw_input().split())

deque = collections.deque()

for i in range(n):
	if i % 2 == 0:
		deque.appendleft(arr[i])

	else :
		deque.append(arr[i])

for i in range(n) :
	arr[i] = str(deque.pop())

if i % 2 == 1:
	print ' '.join(arr)

else :
	print ' '.join(reversed(arr))

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

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

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b_1 = []
b_2 = []
b = []
for i in reversed(range(len(a))):
	if i % 2 != 0:
		b_1.append(a[i])
	else:
		b_2.append(a[i])
if len(a) % 2 == 0:
	b_2.reverse()
	b.extend(b_1)
	b.extend(b_2)
else:
	b_1.reverse()
	b.extend(b_2)
	b.extend(b_1)
for b_num in b:
	print(b_num, end = ' ')

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