#include <cstdio>
#include <vector>
#include <algorithm>
#include <functional>
#include <map>
#include <set>
#include <string>
#include <iostream>
#include <cassert>
#include <cmath>
#include <deque>
using namespace std;

int main() {
        int n, k;
        scanf("%d%d", &n, &k);
        string s;
        cin >> s;
        if (k > 2 * n) k = 2 * n + (k % 2);
        deque<bool> que;
        for (int i = 0; i < n; i ++) {
                que.push_back(s[i] == 'A');
        }
        bool f = false;
        for (int i = 0; i < k; i ++) {
                if (que.front() ^ f) {
                        que.pop_front();
                        que.push_front(f);
                } else {
                        f = !f;
                        que.pop_front();
                        que.push_back(!f);
                }
        }
        string ans = "";
        for (int i = 0; i < n; i ++) {
                ans.push_back(que.front() ^ f ? 'A' : 'B');
                que.pop_front();
        }
        cout << ans << endl;
        return 0;
}

