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 strList = new ArrayList<>(); List resList = new ArrayList<>(); for (int i = 0; i < array.length; i++) { strList.add(array[i]); if (strList.size() == 7) { resList.add(String.join("", strList).equals("treeone") ? "forest" : String.join("", strList)); strList.clear(); } else if (i == array.length - 1) { resList.add(String.join("", strList)); } } System.out.println(String.join("", resList)); } }