word = input() for i in range(len(word) -7+1): if word[i:i+7]=="treeone" and word[i-5:i+1]!="forest": d1 = word[0:i] d2 = word[i+7::] word= d1 + "forest" + d2 print(word)