#define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define MT make_tuple #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)<; using vi = vector; using vll = vector; const string FR = "treeone"; const string TO = "forest"; void solve() { string S; cin >> S; string re; for (int i = 0; i < sz(S);) { if (i + sz(FR) <= sz(S) && S.substr(i, sz(FR))==FR) { i += sz(FR); re += TO; } else { re += S[i]; i++; } } cout << re << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << setprecision(15); solve(); return 0; }