def solve(): S = input() S.rstrip('w') n = 0 ans = 0 for c in S: if c == 'w': n += 1 ans = max(ans, n) else: n = 0 www = 'w' * ans if ans == 0: print('') return if ans == len(S): print('') return p = 0 while True: i = S.find(www, p) if i == -1: break ss = S[p:i] a = ss.split('w')[-1] if a: print(a) p = i + ans if __name__ == '__main__': solve()