#include #include using namespace std; int schimbare(int n,int c1,int c2) { int c,nr,uc1,uc,p; c=n;nr=0; uc=c%10; if(uc==c1) uc=c2; c=c/10; p=10; while(c) { if(c%10==c1) uc1=c2; else uc1=c%10; uc1=uc1*p+uc; uc=uc1; p=p*10; c=c/10; } return uc1; } int main() { ifstream f("input.txt"); ofstream g("output.txt"); int c1,c2; int n; f>>n>>c1>>c2; g<>n>>c1>>c2; if(n==0 && c1==0 && c2==0) break; g<