#include #include using namespace std; int main() { char s[6], c1, c2, *p; cin >> s >> c1 >> c2; while (strcmp (s, "0") && c1 && c2) { p = strchr (s, c1); while (p) { s[p-s] = c2; p = strchr (s, c1); } cout << atoi (s) << endl; cin >> s >> c1 >> c2; } return 0; }