6 string first, second, third;
8 cin >> second >> third;
10 while (first.find(second, starting_from) != string::npos){
11 starting_from = first.find(second, starting_from) + third.length();
12 first = first.replace(first.find(second, starting_from - third.length()), second.length(), third);