#include #include using namespace std; int main() { string str, forest = "forest",treeone="treeone"; string substr; cin >> str; int start = 0; while (true) { int index = str.find(treeone, start); if (index == -1)break; str.erase(index, treeone.size()); str.insert(index, forest); start = index + forest.size(); } cout << str << endl; return 0; }