#include <iostream>
#include <cstdio>
#include <cmath>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define per(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
const int N=1e6+5;
int que[N],head=1,tail,n,k,cmp;
void Output(int n){ rep(i,1,n) putchar(i&1?'B':'A'); } 
int main(){
	scanf("%d%d",&n,&k); tail=n;
	rep(i,1,n){
		char c=getchar();
		while(c!='A'&&c!='B') c=getchar();
		que[i]=c=='A';
	}
	rep(i,1,min(k,2*n)){
		if(cmp^que[head]) que[head]^=1;
		else que[++tail]=cmp,cmp^=1,head++;
	}
	if(k<=2*n){
		rep(i,head,tail) putchar((que[i]^cmp)&1?'A':'B');
		return 0;
	}
	if(n&1){
		putchar((que[head]^cmp^((k-2*n)&1))&1?'A':'B');
		Output(n-1);
	}else Output(n);
	return 0;
}