s=re.split(r'[^a-zA-Z]+',input())
s.reverse()
for i in range(len(s)):
    print(s[i],end=(' '))