#include <iostream>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
 
using namespace std;
 
typedef long long ll;
 
const ll INF = 1e9;
 
int n, k;
string s;
 
int main ()
{
	cin >> n >> k;

	deque <int> a (n);
	cin >> s;
	int rev = 0, ptr = 0, last = 0;

	for (int i = 0; i < n; i++)
		a[i] = (s[i] == 'B');

	for (int i = 0; i < k && ptr <= n; i++)
	{

		if (!(a[0] ^ rev)) 
		{
			a[0] = !rev;
			continue;
		}

		a.pop_front ();
		ptr++;
		rev ^= 1;
		a.push_back (rev);
		last = i;
	}
	last++;

	if ((n & 1) && ((k - last) & 1)) 
		a[0] = !rev;

	for (int j = 0; j < n; j++)
		if (rev ^ a[j]) putchar ('B');
		else putchar ('A');
}