n=eval(input())

n=int(n)

a=input().split()

a=a[::-1]

print((" ".join(a)))
n=int(eval(input()))

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

a=a[::-1]

print((" ".join(a)))
n = eval(input())
n = int(n)
a = input().split()
a = a[::-1]
print((" ".join(a)))

n = int(eval(input()))
a = list(map(str, input().split()))
a = a[::-1]
print((" ".join(a)))

-n = eval(input()) -n = int(n) -a = input().split() +n = int(eval(input())) +a = list(map(str, input().split()))