for i in [f"{input()};{input()}".split(";")[1].split(" ")]: print(" ".join([i[-1-j] for j in range(len(i))]))