// luogu-judger-enable-o2
#include <cstdio>
#include <cstring>
using namespace std;
const int N = 2e5+5;
int n, k, p;
char s[N];
bool bit[N];
int main()
{
    scanf("%d%d%s", &n, &k, s+1), s[n+1] = 'B';
    for(int i = 1; i <= n; ++i) bit[i] = s[i] != s[i+1];
    for(p = 1; p <= n&&k; --k)    
        if(s[1] == 'A') s[1] = 'B', bit[p] ^= 1;
        else if(bit[p] == 0) s[1] = 'A', ++p;
        else ++p;
    if(p <= n)
    {
        for(int i = p+1; i <= n+1; ++i) s[i-p+1] = ((s[i-p]-'A')^bit[i-1])+'A';
        for(int i = n-p+3; i <= n; ++i) s[i] = ((s[i-1]-'A')^1)+'A';
    }
    else for(int i = 1; i <= n; ++i) s[i+(n&1)] = 'A'+(i&1);
    if(k&&(n&1)) s[1] = ((s[1]-'A')^(k&1))+'A'; s[n+1] = 0;
    printf("%s\n", s+1);
    return 0;
}