n = eval(input())

numbers = input().split()

print((' '.join(numbers[::-1])))
n = eval(input())

numbers = list(input().split())

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

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

-numbers = input().split() +numbers = list(input().split())