#include #include using namespace std; vector a; int main() { int n,c1,c2; cin>>n>>c1>>c2; while(n!=0 || c1!=0 || c2!=0) { int p=1,nr=0; while(n) { if(n%10==c1) nr=nr+c2*p; else nr=nr+(n%10)*p; n/=10; p=p*10; } a.push_back(nr); cin>>n>>c1>>c2; } for(int i=0;i