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

const int MAXN = 200005;

char str[MAXN];
int n, k;

int main()
{
	scanf("%d%d", &n, &k);
	scanf("%s", str+1);
	for (int i = 1; i <= n; i++) str[i] -= 'A';
	int cnt = 0, cur = str[1], cc = 0;
	str[n+1] = 1;
        for (int i = 1; i <= k && cnt < n; i++) {
		cc++;
		if (cur == 0) {
			cur ^= 1;
		} else {
			cnt++;
			cur = str[cnt+1]^(cnt&1);
		}
	}
	if (k > cc) {
		k = (k-cc)&1;
		if (k == 1 && (n&1))
			cur ^= 1;
	}
	putchar('A'+cur);
	for (int i = 2; i <= n; i++) {
		if (i+cnt <= n) putchar('A'+(str[i+cnt]^(cnt&1)));
		else putchar(((n-i)&1)?'B':'A');
	}
	puts(""); 
	return 0;
}
