n = int(eval(input()))

a = input().split()



if n % 2 == 0:

    b = a[::-2] + a[::2]

else:

    b = a[::-2] + a[1::2]



print((*b))
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)))
n = int(eval(input()))
a = input().split()
if n % 2 == 0:
    b = a[::-2] + a[::2]
else:
    b = a[::-2] + a[1::2]
print((*b))

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

-print((*b)) +print((" ".join(b)))