#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <fstream>

using namespace std;

int n,k,p;

bool rev;

string s;

int main()
{
	cin >> n >> k >> s;
	int cnt = 0;
	for (int i = 1;i <= k && p < n;i++)
	{
		cnt++;
		if (s[p] == 'A' + rev)
		{
			s[p] = 'B' - rev;
			continue;
		}
		rev ^= 1;
		p++;
	}
	if (p == n)
	{
		if (n & 1)
		{
			k -= cnt;
			cout << char('A' + (k & 1));
		}
		else
			cout << 'B';
	}
	for (int i = p;i < n;i++)
		cout << char(((s[i] - 'A') ^ rev) + 'A');
	for (int i = (p == n);i < p;i++)
		cout << char('A' + ((p - 1 - i) & 1));
	cout << endl;
	return 0;
}