import java.util.Scanner; import java.lang.Math; import java.lang.StringBuilder; import java.util.regex.Pattern; import java.util.Arrays; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); StringBuilder sb = new StringBuilder(s); boolean flag = true; while(flag){ int start = sb.indexOf("treeone"); sb.replace(start, start+7,"forest"); if(sb.toString().contains("treeone")){ flag = true; }else{ flag = false; } } System.out.println(sb); } }