S = input() first_c = S.find("c") first_w = (S[(first_c + 1):].find("w")) + first_c + 1 second_w = (S[(first_w + 1):].find("w")) + first_w + 1 print(first_c) print(first_w) print(second_w) if (first_c >= 0) and (first_w != first_c) and (second_w != first_w): print(second_w - first_c + 1) else: print(-1)