#include #include int main() { char s[101]; scanf("%s", s); int start, pos=0; char *p, tmp[101]; while ((p=strstr(&s[pos], "treeone"))!=0) { start=p-s; pos=start+6; strcpy(tmp, &s[start+7]); strcpy(&s[start], "forest"); strcat(s, tmp); } printf("%s\n", s); return 0; }