S = raw_input() ans = '' for i in range(0, len(S)): if i <= len(S)-7: if S[i]=='t' and S[i+1]=='r' and S[i+2]=='e' and S[i+3]=='e' and S[i+4]=='o' and S[i+5]=='n' and S[i+6]=='e': ans = ans + 'forest' i += 6 else: ans = ans + S[i] else: ans = ans + S[i] print ans