n = str(input()) s1 = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcbvbnm "
for i in n: if i not in s1: n = n.replace(i, " ") l1 = n.split(" ")# 列表 l1 = l1[::-1]# 翻转 s = " ".join(l1) print(s)

n = str(input()) s1 = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcbvbnm "
for i in n: if i not in s1: n = n.replace(i, " ") l1 = n.split(" ")# 列表 l1 = l1[::-1]# 翻转 s = " ".join(l1) print(s)