#include using namespace std; using ll=long long; #define rep(i,p,n)for(ll i=(ll)p;i<(ll)n;i++) #define all(x)(x).begin(),(x).end() #define edt(x1,y1,x2,y2)sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)) int main() { string S; cin>>S; ll streak=0; string ans="",x=""; rep(i,0,S.size()){ if(S[i]=="treeone"[streak]){ //cout<<"maybe"<=7){ ans+="forest"; x=""; streak=0; } else x+=S[i]; } else if(S[i]=='t'){ ans+=x; x+='t'; streak=1; } else{ //cout<<"not"<