#include using namespace std; int main() { string s, t = "treeone", u = "forest"; cin >> s; while (size_t i = s.find(t) != -1) s.replace(i-1, 7, u); cout << s << endl; return 0; }