S = input() mx = 0 i = 0 while i < len(S): j = i while j < len(S) and S[j] != "w": j = j + 1 if j == len(S): break cnt = 0 while j + cnt < len(S) and S[j + cnt] == "w": cnt = cnt + 1 if i != j: mx = max(mx, cnt) i = j + cnt i = 0 while i < len(S): j = i while j < len(S) and S[j] != "w": j = j + 1 if j == len(S): break cnt = 0 while j + cnt < len(S) and S[j + cnt] == "w": cnt = cnt + 1 if i != j and cnt == mx: print(S[i:j]) i = j + cnt