#include<iostream> #include<string> using namespace std; int main() { string s; char p; getline(cin,s); cin>>p; for(char &c:s){ if(c==p)c='#'; } cout<<s<<endl; return 0; }