#include <cstdio>
#include <algorithm>
int N, K, _a[2000002], *a = _a, rev;
char _i[200002];
int main()
{
	scanf("%d%d%s", &N, &K, _i + 1);
	for (int i = 1; i <= N; i++)
		a[i] = _i[i] == 'B';
	for (int T = std::min(K, 1000000); T--; )
	{
		K--;
		if (a[1] ^ rev)
		{
			a++;
			rev ^= 1;
			a[N] = rev;
		}
		else
			a[1] ^= 1;
	}
	putchar('A' + (a[1] ^ rev ^ N & K & 1));
	for (int i = 2; i <= N; i++)
		putchar('A' + (a[i] ^ rev));
	putchar(10);
	return 0;
}
