#include <iostream>
#include <string>
#include <bitset>
#define ll long long
using namespace std;

bitset<200010> bs, fn, xx;

int main() {
	int N, K;
	string S;
	cin >> N >> K >> S;
	for(int i=0; i<N; ++i){
		bs[i]=(S[i]=='B');
		fn[i]=(N-1-i)%2;
		xx[i]=1;
	}
	int cnt=0;
	while(bs!=fn && cnt<K){
		if(bs[0]){
			bs ^= xx;
			bs >>= 1;
			bs[N-1]=0;
		}else{
			bs[0]=1;
		}
		++cnt;
	}
	if(N%2==1 && (K-cnt)%2==1) bs[0]=1;
	for(int i=0; i<N; ++i){
		if(bs[i]) cout << 'B';
		else cout << 'A';
	}
	cout << endl;
	return 0;
}