s=input()+' ';b='';l=[' '];c=m=0 for i in s: if i=='w':c+=1 else: if c>m and b: m=c;l=[] if c==m:l+=[b] if c:b='' c=0;b+=i for i in l:print(i)