Wangbingxiang @ 2024-09-24 23:07:12
#include<bits/stdc++.h>
using namespace std;
long long a,b,x,y,z;
string c;
char d;
int main(){
cin>>x>>y;
cin>>c;
while(x--){
cin>>d;
if(d=='#') ++b;
}
b+=25;
y+=25;
for(long long i=0;i<c.length();++i){
if(c[i]=='#') ++a;
}
for(long long i=0;i<c.length();++i){
if(c[i]=='#'){
if(z+b>=25 && y>=a+(25-z)) {
z=0;
cout<<char((z%26)+'a');
b-=(25-z);
--a;
y-=(25-z);
--y;
}else{
++z;
cout<<char((z%26)+'a');
--a;
--y;
}
}else cout<<c[i];
}
return 0;
}