#yuki_342 # coding: utf-8 import re s = input() for i in s: if s[0]=='w': s=s[1:] if not s: print('') exit() l=re.findall(r'[^w]+w+',s) if not l: print('') exit() c=[] for i in l: c.append(i.count('w')) mc = max(c) for x,wd in zip(c,l): if x==mc: print(re.sub(r'w+','',wd))