import re def solve(): s = input() if s.count("w") == 0 or s.count("w") == len(s): print("") return True s = re.sub(r"^w+", "", s) removeW = re.sub(r"w+", "w", s) splitList = removeW.split("w") matchwords = re.findall(r"w+", s) maxW = max([len(c) for c in matchwords]) idxlist = [] for i in range(len(matchwords)): if len(matchwords[i]) == maxW: idxlist.append(i) idxlist.sort() print("\n".join([splitList[i] for i in idxlist])) return True if __name__=="__main__": solve()