#include <bits/stdc++.h>
using namespace std;
int n, k;
string st;
int main()
{
    cin >> n >> k;
    cin >> st;
    int i = 1, j = 0, c = 0;
    for (; i <= k && j < n; ++ i)
    {
        if ((st[j] == 'A') ^ c)
            if (st[j] == 'B') st[j] = 'A'; else st[j] = 'B';
        else
        {
            j ++;
            c ^= 1;
        }
    }
    if (j >= n)
    {
        if (n & 1)
        {
            if (((k - i) & 1) ^ c) cout << "B"; else cout << "A";
            for (int i = 1; i < n; i += 2) cout << "BA";
        }
        else
            for (int i = 0; i < n; i += 2) cout << "BA";
        return 0;
    }
    for (int p = 0, g = j; p < n; ++ p, ++ g)
    {
        if (g < n) if ((st[g] == 'A') ^ c) cout << 'A'; else cout << 'B';
        else if (((g - n) & 1) ^ c) cout << 'A'; else cout << 'B';
    }
}
