n = int(input())

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

a.reverse()

for i in range(n-1):

    print(a[i],end = " ")

print(a[n-1])

n =int(input())

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

a.reverse()

for i in range(n):

    if i!=n-1:

        print(a[i],end=" ")

    else:

        print(a[i])

n = int(input())
a = list(map(int, input().split()))
a.reverse()
for i in range(n - 1):
    print(a[i], end=" ")
print(a[n - 1])

n = int(input())
a = list(map(int, input().split()))
a.reverse()
for i in range(n):
    if i != n - 1:
        print(a[i], end=" ")
    else:
        print(a[i])

-for i in range(n - 1): -    print(a[i], end=" ") -print(a[n - 1]) +for i in range(n): +    if i != n - 1: +        print(a[i], end=" ") +    else: +        print(a[i])