#define _GLIBCXX_DEBUG #include using namespace std; int main() { string S; cin >> S; string T = ""; for(int i = 0; i < (int)S.size(); i++){ T += S[i]; if(i >= 6 and T.substr(i-6, i+1) == "treeone"){ T = T.substr(0, i-6) + "forest"; } } cout << T << endl; }