#include <bits/stdc++.h>
using namespace std;

const int N = 200005;
bitset<N> bs;

char s[N];
int main(){
	int n, k;
	n = 100000, k = 1000000000;
	scanf("%d %d", &n, &k);
	scanf("%s", s);
	for(int i = 0; i < n; i++) if(s[i] == 'B') bs.set(i);
	int done = 0;
	int doneb = 0;
	for(; doneb < n + 3 && done < k; done++){
		if(bs[0]){
			doneb++;
			// bs = (~(bs >> 1));
			bs >>= 1;
			bs.flip();
			bs.reset(n - 1);
		} else{
			bs.set(0);
		}
	}
	int rem = done - k;
	if((n == 1 || bs[1]) && (rem & 1)) bs.flip(0);
	for(int i = 0; i < n; i++) printf("%c", (bs[i] ? 'B' : 'A'));
}