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