#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return {i, j};
}
struct printer {
  ~printer() { cerr << endl; }
  template <class c>
  printer& operator,(c x) {
    cerr << boolalpha << x;
    return *this;
  }
  printer& operator,(string x) {
    cerr << x;
    return *this;
  }
  template <class c, class d>
  printer& operator,(pair<c, d> x) {
    return *this, "(", x.first, ", ", x.second, ")";
  }
  template <class... d, template <class...> class c>
  printer& operator,(c<d...> x) {
    return *this, range(begin(x), end(x));
  }
  template <class c>
  printer& operator,(rge<c> x) {
    *this, "[";
    for (auto it = x.b; it != x.e; ++it) *this, (it == x.b ? "" : ", "), *it;
    return *this, "]";
  }
};
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int my_rand(int l, int r) { return uniform_int_distribution<int>(l, r)(rng); }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, K;
  cin >> n >> K;
  string s;
  cin >> s;
  bool alternating = true;
  bool allEq = true;
  for (int i = 0; i < n; i++) {
    if (s[i] == s[(i + 1) % n]) {
      alternating = false;
    }
    if (s[i] != s[0]) allEq = false;
  }
  if (alternating) {
    if (K & 1) {
      for (int i = 0; i < n; i++) {
        s[i] = (s[i] == 'B' ? 'W' : 'B');
      }
    }
    cout << s << endl;
  } else {
    cerr << "LINE " << 56 << " >> ", printer(), "[", "s", ": ", (s), "] ";
    queue<int> que;
    vector<bool> vis(n);
    vector<int> dis(n);
    for (int i = 0; i < n; i++) {
      if (s[i] == s[(i + 1) % n]) {
        vis[i] = true;
        vis[(i + 1) % n] = true;
        que.push(i);
        que.push((i + 1) % n);
      }
    }
    while (que.size() > 0) {
      int idx = que.front();
      que.pop();
      if (dis[idx] == K) continue;
      for (int nxt : {(idx + 1) % n, (idx + n - 1) % n}) {
        if (vis[nxt]) continue;
        vis[nxt] = true;
        dis[nxt] = dis[idx] + 1;
        s[nxt] = s[idx];
        que.push(nxt);
      }
    }
    for (int i = 0; i < n; i++) {
      if (vis[i] == 0) {
        if (K & 1) s[i] = (s[i] == 'B' ? 'W' : 'B');
      }
    }
    cout << s << endl;
  }
}
