#include #define rep(i, x) for(ll i = 0; i < x; i++) #define rep2(i, x) for(ll i = 1; i <= x; i++) #define all(a) (a).begin(),(a).end() using ll = long long; using ld = long double; using namespace std; signed main() { string s, t; cin >> s; ll cnt = 0, n = s.size(); rep(i, n - 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') { t.push_back('f'); t.push_back('o'); t.push_back('r'); t.push_back('e'); t.push_back('s'); t.push_back('t'); i += 6; } else { t.push_back(s[i]); } cnt = i; } for (int h = cnt + 1; h < n; h++) { t.push_back(s[h]); } cout << t << endl; return 0; }