n = int(input())

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

print(' '.join(map(str,ls[::-1])))
n = int(input())

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

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

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