#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using P = pair; int main(void) { string s; cin >> s; if (s.size() < 7) { cout << s << endl; return 0; } else { int i = 0; while (i < s.size() - 6) { if (s[i] == 't' && s[i + 1] == 'r' && s[i + 2] == 'e' && s[i + 3] == 'e' && s[i + 4] == 'o' && s[i + 5] == 'n' && s[i + 6] == 'e') { s.erase(i, 7); s.insert(i, "forest"); } i += 7; } } cout << s << endl; return 0; }