#coding:utf-8 import re s=raw_input() r=re.compile(".+?(?:w)+") m=r.findall(s) t=[(i.count("w"),i) for i in m if len(i.replace("w",""))>0] if len(t)==0: exit() m=max([i[0] for i in t]) t=[i[1].replace("w","") for i in t if i[0]==m] print "\n".join(t)