#include #include #include #include #include #define all(x) x.begin(),x.end() #define pb push_back #define ll long long #define P pair #define LP pair using namespace std; int main() { string s; cin >> s; if (s.length() > 6) { for (int i = 0; i < s.length() - 6; i++) { if (s.substr(i,7)=="treeone") { s = s.substr(0, i) + "forest" + s.substr(i + 7, s.length() - i - 7); i += 5; } } } cout << s << endl; return 0; }