#include <bits/stdc++.h>
using namespace std;
const int maxn = 505;
int n,k;

int getMin(int x){
	if(x == 0) return 1000;
	int up = x == 1 ? k : x-1;
	int down = x == k ? 1 : x + 1;
	return min(x,min(up,down));
}

int state[maxn];
char str[maxn];
int arr[maxn];


void solve(){
	for (int i = 1; i <= n ; ++i){
		for (int d = 1 ; d <= k ; ++d){	
			if(state[i] == 1 && d >= arr[i]) break;
			if(state[i] == 2){
				if(getMin(arr[i]) == d){
					arr[i] = d;
					break;
				}
				if(arr[i+1] == d){
					arr[i] = getMin(arr[i]);
					swap(arr[i],arr[i+1]);
					state[i+1] = 1;
					break;
				}
				if(getMin(arr[i+1]) == d){
					arr[i+1] = d;
					swap(arr[i],arr[i+1]);
					state[i+1] = 1;
					break;
				}
				if(arr[i+2] == d){
					swap(arr[i],arr[i+1]);
					swap(arr[i],arr[i+2]);
					arr[i+1] = getMin(arr[i+1]);
					state[i+2] = 1;
					i++; break;
				}	
			} else {
				if(arr[i+1] == d){
					swap(arr[i+1],arr[i]);
					state[i+1] = 1;
					break; 
				}
				if(arr[i+2] == d){
					swap(arr[i],arr[i+1]);
					swap(arr[i],arr[i+2]);
					state[i+2] = 1;
					i++; break;
				}	
			}
	
		}
	}	
	
	
}

int main(){
	int t;
	cin >> t;
	while(t--){
		cin >> n >> k;
		cin >> str + 1;
		//int len = strlen(str);
		memset(arr,0,sizeof(arr));
		memset(state,0,sizeof(state));
		for (int i = 1 ; i <= n ; ++i) arr[i] = str[i] - 'a' + 1;
		for (int i = 1 ; i <= n ; ++i) state[i] = 2;
		solve();
		for (int i = 1; i <= n ; ++i){
			putchar((arr[i] + 'a' - 1));
		}
		putchar('\n');
		
	}

	
	
		
	
	return 0;
}

	    	 	 		 					   	  	 		   	