S = input().rstrip() W, X = "", "" A = [] cnt, MAX = 0, 0 for i in range(len(S)): if S[i] == "w": cnt += 1 X = W else: if MAX <= cnt: if MAX < cnt: A.clear() MAX = cnt if X != "": A.append(X) if cnt > 0: W = "" cnt = 0 W += S[i] if MAX <= cnt: if MAX < cnt: A.clear() A.append(X) for w in A: print(w)