#include<iostream>
#include<string>

using namespace std;

int main(){
	string t,s;
	int brojac=0;	
	cin>>t>>s;
	while(t.find(s)!=string::npos){
		t.replace(t.find(s),1,"*");
		brojac++;
	}
	cout<<brojac<<"\n"<<t;
	return 0;
}