S=input() R="treeone" M="forest" A=[] i=0 flag=0 while(i<=len(S)-len(R)): for m in range(len(R)): if(S[i+m]!=R[m]): A.append(S[i]) i+=1 flag=0 break else: for j in M: A.append(j) i+=len(R) flag=1 if(flag==0): for h in S[len(S)-len(R)+1:]: A.append(h) print("".join(A))