#include #define rep(i,n) for(int i=0; i<(n); i++) using namespace std; typedef long long ll; int main(){ string s; cin>>s; while(1){ if(s.find("treeone")==string::npos) break; int n=s.find("treeone"); s.replace(n,7,"$$$"); } while(1){ if(s.find("$$$")==string::npos) break; int n=s.find("$$$"); s.replace(n,3,"forest"); } cout << s<< endl; }