#P1620C. BA-String
BA-String
Description
You are given an integer and a string that consists only of characters 'a' (a lowercase Latin letter) and '*' (an asterisk).
Each asterisk should be replaced with several (from to inclusive) lowercase Latin letters 'b'. Different asterisk can be replaced with different counts of letter 'b'.
The result of the replacement is called a BA-string.
Two strings and are different if they either have different lengths or there exists such a position that .
A string is lexicographically smaller than a string if and only if one of the following holds:
- is a prefix of , but ;
- in the first position where and differ, the string has a letter that appears earlier in the alphabet than the corresponding letter in .
Now consider all different BA-strings and find the -th lexicographically smallest of them.
The first line contains a single integer () — the number of testcases.
The first line of each testcase contains three integers , and (; ; ). is the length of string .
The second line of each testcase is a string . It consists of characters, each of them is either 'a' (a lowercase Latin letter) or '*' (an asterisk).
The sum of over all testcases doesn't exceed . For each testcase doesn't exceed the total number of different BA-strings. String contains at least one character 'a'.
For each testcase, print a single string, consisting only of characters 'b' and 'a' (lowercase Latin letters) — the -th lexicographically smallest BA-string.
Input
The first line contains a single integer () — the number of testcases.
The first line of each testcase contains three integers , and (; ; ). is the length of string .
The second line of each testcase is a string . It consists of characters, each of them is either 'a' (a lowercase Latin letter) or '*' (an asterisk).
The sum of over all testcases doesn't exceed . For each testcase doesn't exceed the total number of different BA-strings. String contains at least one character 'a'.
Output
For each testcase, print a single string, consisting only of characters 'b' and 'a' (lowercase Latin letters) — the -th lexicographically smallest BA-string.
Note
In the first testcase of the example, BA-strings ordered lexicographically are:
- a
- ab
- abb
- abbb
- abbbb
In the second testcase of the example, BA-strings ordered lexicographically are:
- aa
- aba
- abba
Note that string "aba" is only counted once, even though there are two ways to replace asterisks with characters 'b' to get it.