s=input() head=0 while head=0 and s[st]!='w': st-=1 #print("st=",st) ans.append(s[st+1:i]) for v in ans: if len(v)>0: print(v)