#include <bits/stdc++.h>
 
template <typename T> inline void rd(T& x) {
	int si = 1; char c = getchar(); x = 0;
	while(!isdigit(c)) si = c == '-' ? -1 : si, c = getchar();
	while(isdigit(c)) x = x * 10 + c - 48, c = getchar();
	x *= si;
}
template <typename T, typename... Args>
inline void rd(T& x, Args&... args) { rd(x); rd(args...); }
 
#define fi first
#define se second
 
typedef long long ll;
typedef double ff;
typedef std::pair<int, int> pii;
 
const int kN = 2e5 + 5;
 
char s[kN]; int a[kN];
 
int main() {
	int n, k, km; rd(n, k); km = k; k = std::min(k, 2 * n);
	scanf("%s", s + 1);
	for(int i = 1; i <= n; ++i) a[i] = s[i] - 'A';
	int inv = 0, st = 1;
	for(int i = 1; i <= k; ++i, --km) {
		if(a[st] == inv) a[st] ^= 1;
		else {
			inv ^= 1;
			st = st % n + 1;
		}
	}
	if(n % 2 == 0) {
		for(int i = 1; i <= n; ++i)
			printf("%c", (a[(st + i - 2) % n + 1] ^ inv) + 'A');
	} else {
		printf("%c", (a[st] ^ inv ^ (km & 1)) + 'A');
		for(int i = 2; i <= n; ++i)
			printf("%c", (a[(st + i - 2) % n + 1] ^ inv) + 'A');
	}
	return 0;
}