#include #include using namespace std; int main() { string s; const string from = "treeone"; const string to = "forest"; cin >> s; unsigned int pos = s.find(from); if (pos == string::npos) { cout << s << endl; } else { cout << s.replace(pos, from.length(), to); } return 0; }