words = list(map(str, input().strip().split()))

# print(words[1])
# print(words[0])

for i in range(len(words)-1,-1,-1):
    print(words[i])