#include <cstdio>
#include <vector>
#include <algorithm>

using namespace std;
typedef long long i64;

int main()
{
	int n, k;
	char temp[200005];
	vector<bool> state;

	scanf("%d%d%s", &n, &k, temp);
	state.resize(n);
	for(int i = 0; i < n; ++i)
		state[i] = (temp[i] == 'A');

	int step = k % (2 * n);
	if(k >= 2 * n)
		step += 2 * n;

	int left = 0;
	bool flip = false;

	for(int s = 0; s < step; ++s) {

		bool is_a = (state[left] != flip);

		if(is_a) {
			//printf("%d: %d first\n", s, left);
			state[left] = !state[left];
			continue;
		}

		//printf("%d: %d second\n", s, left);

		left = (left + 1) % n;
		flip = !flip;
	}

	char ans[200005] = {0};
	for(int i = 0; i < n; ++i) {
		int pos = (left + i) % n;
		bool is_a = (state[pos] != flip);
		ans[i] = (is_a ? 'A' : 'B');
	}

	printf("%s\n", ans);

	return 0;
}
