import re

sentence = input()

words = re.findall(r'[a-zA-Z]+', sentence)

words.reverse()

print(' '.join(words))