#include <bits/stdc++.h>
using namespace std;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);  
	string s;
	cin >> s;
	string t = "treeone", r = "forest";
	size_t pos = s.find(t);
	while(pos != string::npos) {
		s.replace(pos, t.size(), r);
		pos = s.find(t, pos + r.size());
	}
	cout << s << endl;
	return 0;	
}