<reponame>subhadeep-123/HackerRank
num, array = int(input()), list(map(str, input().split()))
print(' '.join(array[::-1]))

num, array = int(input()), list(map(str, input().split()))
print(' '.join(array[::-1]))