#include<bits/stdc++.h>
using namespace std;
int a[1000100];
int main()
{
	int n,k;scanf("%d%d\n",&n,&k);k=min(k,2*n+2+k);
	for (int i=1;i<=n;i++) a[i]=(getchar()=='A');a[n+1]=1;
	int now=1,rol=0;
	while (k--)
	{
		if ((a[now]^rol)) a[now]^=1;
		else
		{
			now++;if (now>n) now=1;
			rol^=1;
		}
	}
	for (int i=now;i<=n;i++) putchar((a[i]^rol)?'A':'B');
	for (int i=1;i<now;i++) putchar((a[i]^rol)?'A':'B');
}