import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = read().decode().rstrip() while S and S[0] == 'w': S = S[1:] max_w = 0 for n in range(1,101): if S.find('w' * n) != -1: max_w = n S = S.replace('w'*max_w, '$ ').replace('w','% ') answer = [x for x in S.split() if x[-1] == '$'] for x in answer: print(x[:-1])