import re sentence=input() word=re.split('\W',sentence) word.reverse() new_sentence=' '.join(word) print(new_sentence)