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 = input().split()
b = [a[0], []]
last = b[1]

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

ret = []
for _ in range(n):
    ret.append(b[0])
    b = b[1]

if n%2==0:
    print(" ".join(ret))
else:

    print(" ".join(ret[::-1]))

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

if n % 2 == 1:
    b = a[::2]
    c = a[1::2]
    b.reverse()
    d = b+c
    print(' '.join(map(str,d)))
else:
    b = a[::2]
    c = a[1::2]
    c.reverse()
    d = c+b
    print(' '.join(map(str,d)))

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):
n = int(input())
a = list(map(int, input().split()))

b = []

for i in range(n-1, -1, -2):
	b.append(str(a[i]))

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

print(" ".join(b))

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

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

A = list(input().split())

if N==1:
    print(A[0])
else:
    side1 = A[0::2]
    side2 = A[1::2]
    if N%2==0:
        print(" ".join(side2[::-1]+side1))
    else:
        print(" ".join(side1[::-1]+side2))

Solution (Python):





if __name__ == '__main__':
    n = int(input())
    a = list(map(str, input().split()))
    odd = a[::2]
    even = a[1::2]

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

    print(' '.join(result))

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

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

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

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

n = I()
a = LI()
even = a[0::2]
odd = a[1::2]

if n % 2:
    ans = even[::-1]
    ans.extend(odd)
else:
    ans = odd[::-1]
    ans.extend(even)
for i in ans:
    print(i, end=" ")

Solution (Python):


N = int(input())
As = list(map(int, input().split()))
b = []
i = len(As) - 1
while i >= 0:
    b.append(As[i])
    i -= 2

i = len(As) % 2
while i<len(As):
    b.append((As[i]))
    i += 2

print(*b)

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

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

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

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

res = []
if n % 2 == 0:
	even = reversed(even)
	res.extend(even)
	res.extend(odd)
else:
	odd = reversed(odd)
	res.extend(odd)
	res.extend(even)

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

Solution (Python):

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

n = int(input())
A = inpl()

if n == 1:
    print(A[0])
else:
    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])))

Solution (Python):

import math
import sys
import itertools
import numpy as np
import functools
import collections
mo = 1000000007
INF = 10**100
r = range

class infix(object):
    def __init__(self, function):
        self.function = function

    def __ror__(self, other):
        self.left = other
        return self

    def __or__(self, other):
        return self.function(self.left, other)

    def __call__(self, value1, value2):
        return self.function(value1, value2)

@infix
def c(f_t_u, f_u_r): return lambda t: f_u_r(f_t_u(t))

class _Ap(object):
    def __rlshift__(self, other):
        self.value = other
        return self

    def __rshift__(self, other):
        return other(self.value)
Ap = _Ap()
A = Ap




n=input()<<A>>int
a=map(int,input().split())
if n<=2:
    for i in range(n): 
        print(''.join(str(c)+' ' for c in a))
    exit()

index=[n//2]*n
if n%2:
    for i in range(n):
        index[i] += ((i+1)//2) * (+1 if i%2 else -1);
else:
    for i in range(n):
        index[i] += ((i+1)//2) * (-1 if i%2 else +1);


a=list(a)
ret=[0]*n
for i in range(n): 
    ret[index[i]]=a[i]
print(''.join(str(x)+' ' for x in ret))

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

Solution (Python):
from collections import deque

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

b = deque()

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

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

Solution (Python):
N = int(input())
a = input().split()
b = [""] * N
b1 = [a[i] for i in range(len(a)) if i % 2 == 1][::-1]
b2 = [a[i] for i in range(len(a)) if i % 2 == 0]
b = b1 + b2
if N % 2 == 1:
	b = b[::-1]
line = " ".join(b)
print(line)

Solution (Python):


from collections import deque
d=deque()
n=int(raw_input())
a=raw_input().split()
for i in xrange(n):
 if i%2==n%2:
  d.append(a[i])
 else:
  d.appendleft(a[i])
for i in xrange(n):
 print d[i],
print

Solution (Python):



import numpy as np

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

m = n/2
b = []

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

else:
    i = 0
    while i <= m:
        b.append(a[2*(m-i)])
        i += 1
    i = 0
    while i < m:
        b.append(a[2*i+1])
        i += 1

for s in b:
    print s+" ",
print ""

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








ans = []
if N % 2 == 1:
    for ss in s[::-1][0::2]:
        ans.append(ss)
    for ss in s[1::2]:
        ans.append(ss)
else:
    for ss in s[::-1][0::2]:
        ans.append(ss)
    for ss in s[0::2]:
        ans.append(ss)
print(" ".join(ans))

Solution (Python):
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(input())
def pli(a): return "".join(list(map(str, a)))

n = ri()
a = rli()
b = []

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

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

Solution (Python):

n = int(input())
a = input().split()
l = []
r = []
for a_i in a:
    r += [ a_i ]
    l, r = r, l
print(*(list(reversed(l)) + r))

Solution (Python):
n = int(input())
A = list(map(int,input().split()))
print(' '.join(map(str,A[::-2]))+' '+' '.join(map(str,A[len(A)%2::2])))

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

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

e = A[::2]
o = A[1::2]
ans = e[::-1] + o
if n % 2 == 0:
    ans = ans[::-1]
print " ".join(map(str, ans))

Solution (Python):
from math import floor

def c(n,x):
    ret = [-1] * n
    for i in range(n):
        if i%2 == 0: idx = floor(i/2) 
        else: idx = n - 1 - floor(i/2)
        ret[idx] = x[n-i-1] 
    return " ".join([str(i) for i in ret])

def main():
    n = int(input())
    x = list(map(int, input().split()))
    print(c(n,x))

def test():
    print( c(4,[1,2,3,4]))
    print( c(6,[0,6,7,6,7,0]))
main()

Solution (Python):
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
    A = reversed(A)
    left = 0
    right = N - 1
    res = [0] * N
    for i,val in enumerate(A):
        if i % 2 == 0:
            res[left] = val
            left += 1
        else:
            res[right] = val
            right -= 1
    print(" ".join(map(str,res)))

Solution (Python):
from collections import deque

n = int(input())
l = list(map(int, input().split()))
d = deque()

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

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

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

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

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

Solution (Python):
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
    A = reversed(A)
    left = 0
    right = N - 1
    res = [0] * N
    for i,val in enumerate(A):
        if i % 2 == 0:
            res[left] = val
            left += 1
        else:
            res[right] = val
            right -= 1
    print(" ".join(map(str,res)))

Solution (Python):
import math
inf=float('inf')
N = int(input())
x = list(map(int, input().split()))
y = [0]*(N)
j=0
for i in range(0,N,1):
    
    if i%2==0:
        y[j]=x[N-1-i]
  
    if i%2==1:
        y[N-1-j]=x[N-1-i]
        j+=1
    
    


for i in range(len(y)):
    print(y[i],end=' ')
 
quit()

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

Solution (Python):
import sys

stdin = sys.stdin

ns = lambda: stdin.readline()
ni = lambda: int(ns())
na = lambda: list(map(int,stdin.readline().split()))

n = ni()
a = na()

l = []
m = []
for i, x in enumerate(a):
    if (i%2==1):
        l.append(x)
    else:
        m.append(x)

if (n%2==0):
    l.reverse()
    l.extend(m)
    ret = l
else:
    m.reverse()
    m.extend(l)
    ret = m

ans = ""
for i, x in enumerate(ret):
    ans += str(x)
    if (i!=n-1): ans += " "
    
print (ans)

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

Solution (Python):
input()
n=[x for x in input().split()]
nb=n[::-1]
bs=n[::2]
if len(nb)%2==0:
    be=nb[::2]
else:
    be=nb[1::2]
if len(n)==1:
    print(n[0])
else:
    ans=be+bs
    if len(n)%2!=0:
        ans=ans[::-1]
    print(" ".join(ans))

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

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

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 S(): return input()


def main():
    n = I()
    a = LI()
    a1 = a[0::2]
    a2 = a[1::2]
    r = []
    if n % 2 == 0:
        r = a2[::-1] + a1
    else:
        r = a1[::-1] + a2
    return ' '.join(map(str, r))


print(main())

Solution (Python):
n=int(raw_input())
N=map(int,raw_input().split())
a=[]
b=[]
for i in range(n):
    if i%2==0:
        a.append(N[i])
    else:
        b.append(N[i])
if n%2==0:
    b.reverse()
    for i in b+a:
        print i,
else:
    a.reverse()
    for i in a+b:
        print i,

Solution (Python):
n=int(input());A=input().split();print(*A[-1::-2]+A[n%2::2])

Solution (Python):


import collections


def solve():
    n = int(input())
    qo = collections.deque()
    qe = collections.deque()

    for i, a in enumerate(map(int, input().split())):
        if i % 2 == 0:
            qe.append(a)
        else:
            qo.append(a)

    r = []

    if n % 2 == 0:
        while qo:
            r.append(qo.pop())
        while qe:
            r.append(qe.popleft())
    else:
        while qe:
            r.append(qe.pop())
        while qo:
            r.append(qo.popleft())
    print(" ".join(map(str, r)))


solve()

Solution (Python):
N=int(raw_input())
P=raw_input().split()
b=P[-1::-2]+P[N%2::2]
print " ".join(b)

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

for i in range(len(a)):
    a[i]=int(a[i])

b=[0 for i in range(len(a))]

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

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

if n%2==0:

    for i in range(n):

        if n-i*2-1 > 0:
            b.append(a[n-i*2-1])
        else:
            k=abs(n-i*2)
            b.append(a[k])

else:
    
    for i in range(n):

        if n-i*2-1 >= 0:
            b.append(a[n-i*2-1])
        else:
            k=abs(n-i*2-1)
            b.append(a[k-1])

print(*b)

Solution (Python):
read = lambda: map(int, input().split())
n = int(input())
a = list(read())
from collections import deque
b = deque()
x = 1
for i in range(n):
    if x: b.append(a[i])
    else: b.appendleft(a[i])
    x ^= 1
ans = list(b)
if not x: ans = ans[::-1]
print(*ans)

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

a.insert(0,-1)

m=len(a)-1
res=""

k=m
for i in range(int(m/2)+1):
    res+=str(a[k])+" "
    k-=2
    if k<=0:
        break

if m%2==0:
    s=1
else:
    s=2

if m>1:
    k=s
    for i in range(int(m/2)+1):
        res+=str(a[k])+" "
        k+=2
        if k>=m:
            break

print(res)

Solution (Python):
n = int(input())
xs = [int(i) for i in input().split()]
if n == 1:
    print(xs[0])
else:
    output1 = [None] * (n // 2)
    output2 = [None] * (n // 2)
    suf = 1
    if n % 2 == 1:
        suf = 2
    for i in range(n // 2):
        output1[i] = xs[i*2]
        if -(-2 * i - suf) <= n:
            output2[i] = xs[-2 * i - suf]
    if n % 2 == 1:
        output1.append(xs[n - 1])
        output1.reverse()
        output2.reverse()
        print(" ".join([str(i) for i in (output1 + output2)]))
    else:
        print(" ".join([str(i) for i in (output2 + output1)]))

Solution (Python):



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

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

print(*ans)

Solution (Python):
from collections import deque

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

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

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

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

b = [0] * n

for i in range(n):
  if i < n/2:
    b[i] = a[(n-1) - (2*i)]
  else:
    b[i] = a[2*i - n]
print(' '.join(list(map(str, b))))

Solution (Python):

import array, bisect, collections, copy, heapq, itertools, math, random, re, string, sys, time

sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7


def II(): return int(input())
def ILI(): return list(map(int, input().split()))
def IAI(LINE): return [ILI() for __ in range(LINE)]
def IDI(): return {key: value for key, value in ILI()}


def read():
    n = II()
    a = list(map(str, input().split()))
    return n, a


def solve(n, a):
    b = collections.deque([])
    if n % 2 == 0:
        for i, ele in enumerate(a):
            if i % 2 == 0:
                b.append(ele)
            else:
                b.appendleft(ele)
    else:
        for i, ele in enumerate(a):
            if i % 2 == 0:
                b.appendleft(ele)
            else:
                b.append(ele)

    ans = " ".join(list(b))
    return ans


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()

Solution (Python):

if __name__ == "__main__":
	n = int(input())
	num_array = input().split(" ")
	result = [0 for i in range(n)]
	for i in range(n)[::-1]:
		differ = n - (i + 1)
		if differ % 2 == 0:
			result[differ // 2] = num_array[i]
		else:
			result[- ((differ + 1) // 2)] = num_array[i]
	result_word = result[0]
	for w in result[1:]:
		result_word += " " + w
	print(result_word)

Solution (Python):
n=int(input())
a=[int(i) for i in input().split()]
ans=[]
for i in range(0,n,2):
	ans.append(a[i])
ans.reverse()
for i in range(1,n,2):
	ans.append(a[i])

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

Solution (Python):
import sys
from collections import deque

from math import *
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    n = int(input_raw[0])
    input_raw = list(read_func().strip().split())
    b_list = deque([])
    is_last_first = False
    for i in range(n):
        is_last_first = not(is_last_first)
        if is_last_first == True:
            b_list.append((input_raw[i]))
        else:
            b_list.appendleft(input_raw[i])

    if is_last_first == True:
        b_list.reverse()
    print " ".join(b_list)


if __name__ == '__main__':
    main()

Solution (Python):
import math
import numpy as np

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

b=np.zeros(n, dtype=int)
pos=math.ceil((n-1)/2)

forward=True
for i in range(n):
    
    b[pos]=a[i]
    if forward:
        forward=False
        pos-=(i+1)
    else:
        forward=True
        pos+=(i+1)
        
if forward:
    for i in range(n):
        print(b[i],end=' ')
else:
    for i in range(n):
        print(b[n-1-i],end=' ')

Solution (Python):
import sys





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


def read_int():
    return int(input())


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


def read_str():
    return input()


def solve():
    n = read_int()
    a = read_int_list()
    b = [0] * n
    p = 0
    q = n - 1
    for i in range(n-1, -1, -1):
        if i % 2 == (n-1) % 2:
            b[p] = a[i]
            p += 1
        else:
            b[q] = a[i]
            q += -1
    return ' '.join(map(str, b))


def main():
    res = solve()
    print(res)


if __name__ == '__main__':
    main()

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

for i in range((n+1)/2):
    print a[n-2*i-1],
for i in range(n/2):
    print a[i*2+n%2],
print ''

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

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

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

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

Solution (Python):
n = int(input())
out = [0 for x in range(n)]
inp = [int(x) for x in input().split(' ')]
if n%2==0:
    for i in range(n):
        if i % 2 == 0:
            out[int(n/2) + int(i/2)] = inp[i]
        else:
            out[int(n/2) - int((i+1)/2)] = inp[i]
else:
    k = int((n-1)/2)
    for i in range(n):
        if i % 2 == 0:
            out[k - int(i/2)] = inp[i]
        else:
            out[k+int((i+1)/2)] = inp[i]
for i in out:
    print(i, end=' ')

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

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

b = c[::-1] + b

if n % 2:
  print " ".join(b)
else:
  print " ".join(b[::-1])

Solution (Python):
n = int(input())
A = [int(i) for i in input().split()]
B = []
if n%2:
	B = [A[n-1-2*i] for i in range(n//2)]
	B.append(A[0])
	B += [A[2*i+1] for i in range(n//2)]
else:
	B = [A[n-1-2*i] for i in range(n//2)]
	B += [A[2*i] for i in range(n//2)]
print(*B)

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

i = n - 1
while i >= 0:
    print a[i],
    i -= 2
if i == -1:
    i = 0
else:
    i = 1
while i < n - 2:
    print a[i],
    i += 2
if n != 1:
    print a[n - 2]

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

from collections import deque

q = deque()
for i in range(len(a)):
    if i & 1:
        q.appendleft(a[i])
    else:
        q.append(a[i])

q = list(q)
if len(q) & 1:
    q = reversed(q)

print(*q)

Solution (Python):
n=int(raw_input())
a=map(int,raw_input().split())
ansr=[]
ansl=[]
if n%2==0:
    for i in xrange(0, n, 2):
        ansr.append(a[i])
    for i in xrange(1, n, 2):
        ansl.append(a[i])
else:
    for i in xrange(0, n, 2):
        ansl.append(a[i])
    for i in xrange(1, n, 2):
        ansr.append(a[i])
ansl.reverse()
print " ".join(map(str,ansl)) +" "+ " ".join(map(str, ansr))

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

Solution (Python):
import collections

b = collections.deque()
n = int(input())
As = list(map(int, input().split()))
for i, a in enumerate(As):
    if i & 1:
        b.append(a)
    else:
        b.appendleft(a)
if n % 2 == 0:
    b.reverse()
print(*b)

Solution (Python):

n = int(input())
a_list = list(input().split())

res_list = []
for i in range(n-1, -1, -2):
    res_list.append(a_list[i])
if n % 2 == 0:
    for i in range(0, n, 2):
        res_list.append(a_list[i])
else:
    for i in range(1, n, 2):
        res_list.append(a_list[i])
        
print(" ".join(res_list))

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

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

if N % 2 == 0:
    start = 0
else:
    start = 1

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

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

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

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

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

Solution (Python):

import sys,collections

input=sys.stdin.readline

n=int(input())

d=collections.deque()

c=0
for i in map(int,input().split()):
    if c==0:
        d.append(i)
        c=1
    else:
        d.appendleft(i)
        c=0

if c==1:
    l=list(d)[::-1]
else:
    l=list(d)

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

Solution (Python):
from collections import deque


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

Solution (Python):
n = input()
xs = [int(c) for c in input().split()]

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

if len(xs) & 1:
    a = list(reversed(p)) + q
else:
    a = list(reversed(q)) + p

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

Solution (Python):
n = input()
A = raw_input().split()
B = A[0::2]
C = A[1::2]
if n % 2 == 1:
    print " ".join(B[::-1] + C)
else:
    print " ".join(C[::-1] + B)