eval(input())

print((' '.join(input().split()[::-1])))
eval(input())

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

print((*n[::-1]))

eval(input())
print((" ".join(input().split()[::-1])))

eval(input())
n = list(map(int, input().split()))
print((*n[::-1]))

-print((" ".join(input().split()[::-1]))) +n = list(map(int, input().split())) +print((*n[::-1]))