282 传统题

[CF1675E] 全局前移最小字典序 (Replace With the Previous, Minimize)

时间限制
2000ms
内存限制
256MiB
登顶 / 尝试
0/ 0
难度
4

[CF1675E] 全局前移最小字典序 (Replace With the Previous, Minimize)

Problem Statement

You are given a lowercase string ss of length nn and an integer kk.

In one operation, choose any character c≠’a’c \ne \texttt{'a'} and replace all occurrences of cc in ss with its preceding letter c−1c - 1.

Find the lexicographically smallest string obtainable after at most kk operations.

Input

The first line contains tt (1≤t≤1041 \le t \le 10^4). Each test case consists of n,kn, k (1≤n≤2⋅1051 \le n \le 2 \cdot 10^5, 1≤k≤1091 \le k \le 10^9) and a lowercase string ss of length nn. The sum of nn does not exceed 2⋅1052 \cdot 10^5.

Output

For each test case, output the lexicographically smallest resulting string.

Example

4
3 2
cbc
4 2
ecab
4 5
dbca
5 25
ihfaq
aaa
ccab
aaaa
aaaaa

Note