#pragma GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,tune=native")
#include<bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
using namespace std;
using ll = long long;
//using arr = array;
using pi = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vpi = vector<pi>;
using ld = long double;
const int maxn = 1<<18, mod = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int n, k;
int s[maxn];
string get() {
	int l = 0, a = 0;
	#pragma GCC ivdep
	for(int i = 0; i < k; i++) {
		if(s[l] == a) s[l] = !a;
		else {
			l = ++l == n ? 0 : l;
			a ^= 1;
			s[l ? l-1 : n-1] = a;
		}
	}
	string res;
	for(int i = 0; i < n; i++) {
		res += char('A' + (s[l++]^a));
		if(l == n) l = 0;
	}
	return res;
}
int main() {
	cin.tie(0)->sync_with_stdio(0);
	cin >> n >> k;
k = min(k, 2*n + (k&1));
	char t;
	for(int i = 0; i < n; i++) cin >> t, s[i] = t-'A';
	
	cout << get();
}
