#include <iostream> #include <cstring> using namespace std; int main() { char s[101],a[11],b[11],*p,aux[101]; cin>>s>>a>>b; while(p=strstr(s,a)) { strcpy(aux,b); strcat(aux,p+strlen(a)); strcpy(p,aux); } cout<<s; return 0; }