s=input() res=0 now=0 while len(s) and s[0]=='w': s=s[1:] for i in range(len(s)): if s[i]=='w': now+=1 else: res=max(res,now) now=0 res=max(res,now) if res==0: print('') exit() s+='お' left=0 now=0 for i in range(len(s)): if s[i]=='w': now+=1 elif i-1>=0 and s[i-1]=='w': if res==now: print(s[left:i-res]) now=0 left=i