from functools import reduce s=input() t=[c for c in s] for i in range(0,len(t)-6): if t[i]=="t": if t[i+1]=="r": if t[i+2]=="e": if t[i+3]=="e": if t[i+4]=="o": if t[i+5]=="n": if t[i+6]=="e": t[i]="f" t[i+1]="o" t[i+2]="r" t[i+3]="e" t[i+4]="s" t[i+5]="t" t[i+6]=" " while " " in t: t.remove(" ") print(reduce(lambda x, y: x + y, [str(x) for x in t]))