#include<bits/stdc++.h>
using namespace std;
int n,k;
char s[200005];
int t,f,h;
void output(){
	for (int i=0;i<n;i++)
		putchar('A'+(s[(h+i)%n]==f));
	exit(0);
}
int main(){
	scanf("%d%d%s",&n,&k,s);
	for (int i=0;i<n;i++)
		s[i]=(s[i]=='A');
	h=0,t=0;
	for (;h<n;){
		if (s[h]!=f) s[h]^=1;
		else h++,f^=1;
		if ((++t)==k) output();
	}
	h=0;
	if (n%2==1&&(k-t)%2==1)
		s[h]^=1;
	output();
}