#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[i] == 't' and s[i + 1] == 'r' and s[i + 2] == 'e' and s[i + 3] == 'e' and s[i + 4] == 'o' and s[i + 5] == 'n' and s[i + 6] == 'e') { s[i] = 'f'; s[i + 1] = 'o'; s[i + 2] = 'r'; s[i + 3] = 'e'; s[i + 4] = 's'; s[i + 5] = 't'; s[i + 6] = NULL; i += 6; } } } cout << s << endl; return 0; }