#include #include #include int main() { //std::ifstream inf("Text.txt"); std::cin.rdbuf(inf.rdbuf()); std::string S; std::cin >> S; unsigned int i = 0; while (i < S.length()) { i = S.find("treeone", i); if (std::string::npos != i) { S.replace(i, 7, "forest"); i = i + 6; } } std::cout << S << std::endl; return 0; }