#include #define INF 990000000 //24 using namespace std; int main() { string s; cin>>s; string target = "treeone"; // 検索文字列 string replacement = "forest"; // 置換文字列 if (!target.empty()) { string::size_type pos = 0; while ((pos = s.find(target, pos)) != string::npos) { s.replace(pos, target.length(), replacement); pos += replacement.length(); } } cout << s<