#include using namespace std; int main() { string s; cin >> s; if (s.length() < 7) { cout << s << endl; return 0; } string ans = ""; for (int i = 0; i < s.length(); i++) { if (s.substr(i, 7) == "treeone") { ans += "forest"; i += 6; } else if (s.length() - i < 7) { ans += s.substr(i, s.length() - i); break; } else { ans += s[i]; } } cout << ans << endl; return 0; }