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

typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007

int N, K;
string S;
signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  cin >> N >> K;
  deque<bool> d;
  rep(i, N) {
    char c; cin >> c;
    d.push_back(c == 'A');
  }
  bool f = false;
  int mx = min(K, N*2 + (K%2));
  rep(i, mx) {
    if ((d.front() ^ f) == true) {
      d.pop_front();
      d.push_front(f);
    }
    else {
      d.pop_front();
      f ^= true;
      d.push_back(f ^ true);
    }
  }
  rep(i, N) cout << ((d[i]^f)?'A':'B'); cout << "\n";
  return 0;
}
