#include using namespace std; int main() { string s; cin >> s; auto pos = s.find("treeone"); while (pos != string::npos) { s.replace(pos, 7, "forest"); pos = s.find("treeone", pos + 6); } cout << s << endl; return 0; }