from collections import defaultdict def solve(): S = input() if "w" not in S or len(set(S)) == 1: return [] S += '_' m = defaultdict(list) s = "" cnt = 0 flg = False for a in S: if flg: if a == "w": cnt += 1 else: flg = False m[cnt] += [s] s = a else: if a == "w": flg = True cnt = 1 else: s += a return max(m.items())[1] w = solve() if w == []: print("") else: print(*w, sep="\n");