import sys



n = int(eval(input()))

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

for i in range(len(a) - 1, -1, -1):

    if i > 0:

        sys.stdout.write(str(a[i]))

        sys.stdout.write(' ')

    else:

        print((a[i]));
n = int(input())

a = input().split()

for i in range(n):

    a[i] = int(a[i])



b = []

for i in range(n):

    b.append(a[n - 1 - i])



for i in range(n):

    if i < n - 1:

        print(b[i], end=' ')

    else:

        print(b[i])

import sys

n = int(eval(input()))
a = [int(i) for i in input().split()]
for i in range(len(a) - 1, -1, -1):
    if i > 0:
        sys.stdout.write(str(a[i]))
        sys.stdout.write(" ")
    else:
        print((a[i]))

n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
b = []
for i in range(n):
    b.append(a[n - 1 - i])
for i in range(n):
    if i < n - 1:
        print(b[i], end=" ")
    else:
        print(b[i])

-import sys - -n = int(eval(input())) -a = [int(i) for i in input().split()] -for i in range(len(a) - 1, -1, -1): -    if i > 0: -        sys.stdout.write(str(a[i])) -        sys.stdout.write(" ") +n = int(input()) +a = input().split() +for i in range(n): +    a[i] = int(a[i]) +b = [] +for i in range(n): +    b.append(a[n - 1 - i]) +for i in range(n): +    if i < n - 1: +        print(b[i], end=" ") -        print((a[i])) +        print(b[i])