#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000100;
int stk[maxn], he, tp, neg;
void push(int v){
	stk[tp++] = v ^ neg;
}
int seek(){
	return stk[he] ^ neg;
}
void pop(){
	he++;
}
int main(){
	int n, k; cin >> n >> k;
	string s; cin >> s;
	for(int i = 0; i < n; i++){
		if(s[i] == 'A') push(0);
		else push(1);
	}
	auto op = [&](){
		if(seek() == 0){
			stk[he] ^= 1;
		} else {
			pop();
			neg ^= 1;
			push(0);
		}
	};
	int sm = min(3 * n, k);
	for(int i = 0; i < sm; k--, i++){
		op();
	}	
	k %= 2;
	if(k){
		op();
	}
	for(int i = 0; i < n; i++){
		cout << char('A' + seek());
		pop();
	}
	cout << endl;
	return 0;
}
