#include #include using namespace std; string replaceOtherStr(string &replacedStr, string from, string to) { const unsigned int pos = replacedStr.find(from); const int len = from.length(); if (pos == std::string::npos || from.empty()) { return replacedStr; } return replacedStr.replace(pos, len, to); } int main(){ string s; cin >> s; bool flg = 0; for(int i = 0; i < s.length(); i++){ int u = s.compare(i, 7, "treeone"); if(u == 0){ flg = 1; break; } } if(flg) replaceOtherStr(s, "treeone", "forest"); cout << s << endl; return 0; }