#include using namespace std; int main() { const string tree = "treeone"; const string forest = "forest"; string s; cin >> s; string ans; for(int i = 0; i < s.size();) { if(s.substr(i, tree.size()) == tree) { ans += forest; i += tree.size(); } else { ans += s[i]; i++; } } cout << ans << '\n'; return 0; }