S=input() R="treeone" M="forest" A=[] i=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 break else: for j in M: A.append(j) i+=len(R) for h in S[len(S)-len(R)+1:]: A.append(h) print("".join(A))