#include <iostream>
#include <string>
#include <cstdio>
using namespace std;
const int N = 200010;
int n, k,f,r;
string s;
char q[N*10];
char oppo(char ch)
{
	return 'A' + ((ch - 'A') ^ 1);
}
char show(int c, char ch)
{
	if (!c) return ch;
	else return oppo(ch);
}
int main()
{
	cin >> n >> k >> s;
	int c = 0, step = 0;
	for (int i = 0; i < n; i++)
	{
		if (c == s[i] - 'A') step += 2; else step++;
		c = c ^ 1;
	}
	if (k > step) k = (k - step) % n + step;
	c = 0; f = 0; r = n;
	for (int i = 0;i < n;i++) q[i] = s[i];
	while (k--)
	{
		if (show(c, q[f]) == 'A') q[f] = oppo(q[f]);
		else {
			c ^= 1;
			f++;
			q[r++] = show(c, 'A');
		}
	}
	if (c) for (int i = f; i < r; i++) q[i] = oppo(q[i]);
	for (int i = f;i < r;i++) printf("%c",q[i]);
	return 0;
}
