# import sys
while True:
    try:
        s = input().strip()
        l = s.split()[::-1]
        print(' '.join(l))
    except:
#         print(sys.exc_info())
        break