#include <cstdio>
char str[400005];
int main()
{
	// freopen("AGC011-D.in", "r", stdin);
	int n, k;
	scanf("%d%d%s", &n, &k, str);
	int l = 0, r = n, lazy = 0;
	while (k-- && l < n)
	{
		if ((str[l] ^ lazy) == 'A')
			str[l] ^= 3;
		else
		{
			lazy ^= 3;
			str[r++] = 'A' ^ lazy;
			l++;
		}
	}
	if ((n & 1) && !(k & 1))
		str[l] ^= 3;
	for (int i = l; i < r; i++)
		putchar(str[i] ^ lazy);
	puts("");
	return 0;
}
