#include using namespace std; const string bf = "treeone"; const string af = "forest"; int main() { string s, t = ""; cin >> s; const int n = s.length(); for (int i = 0; i < n; i++) { if (s.substr(i, 7) == bf) { t += af; i += 6; } else { t += s[i]; } } cout << t << endl; return 0; }