```while True:
    try:
        s = input().split(' ')
        res = [x for x in reversed(s)]
        print(' '.join(res))
    except:
        break