S = input().rstrip() W, X = "", "" A = [] cnt, MAX = 0, 0 flag = False for i in range(len(S)): if S[i] == "w": if flag: cnt += 1 X = W else: flag = True 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)