#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int long long
const int mod=998244353;
const int N=2e5+10;
int t,n,k,x;
char ch[N];
void dfs(int pos,int now){
if(pos==0) return ;
int cnt=0;
while(pos&&ch[pos--]=='*') ++cnt;
// cout<<pos<<endl;
dfs(pos,now/(cnt*k+1));
if(ch[pos+1]=='a') cout<<'a';
for(int i=1;i<=now%(cnt*k+1);i++) cout<<'b';
}
int32_t main(){
scanf("%lld",&t);
while(t--){
scanf("%lld%lld%lld",&n,&k,&x);cin>>ch+1;
dfs(n,x-1);cout<<endl;
}
}
10-17
734
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交