#include using namespace std; int main() { string s; vector ls; int i = 0; cin >> s; while(s.find("treeone",i) != s.npos){ i = s.find("treeone",i); ls.push_back(i); i++; } for(int k = ls.size()-1; k>=0; k--){ s.replace(ls[k],ls[k]+7,"forest"); } cout << s << endl; return 0; }