import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] array = sc.next().split(""); List res = new ArrayList<>(); List target = new ArrayList<>(); for (String str : array) { target.add(str); if (target.size() == 7) { if (String.join("", target).equals("treeone")) { str = "forest"; } } res.add(str); target.clear(); } System.out.println(String.join("", res)); } }