#include <bits/stdc++.h>
using namespace std;
const int MX = 200005;
int n, k, t[MX];
string s;
char res[MX];
vector<int> v;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> s;
  if (n % 2 == 0) {
    int f = 1;
    for (int i = 0; i + 1 < n; i++) f &= s[i] != s[i + 1];
    if (f) {
      for (int i = 0; i < n; i++) cout << "BW"[(s[i] == 'W') ^ bool(k % 2)];
      cout << '\n';
      return 0;
    }
  }
  memset(t, -1, sizeof(t));
  for (int i = 0; i < n; i++)
    if (s[i] == s[((((i - 1) % (n)) + (n)) % (n))] || s[i] == s[(i + 1) % n]) {
      v.push_back(i);
      t[i] = 0;
      res[i] = s[i];
    }
  for (int x : v) {
    if (s[x] != s[((((x - 1) % (n)) + (n)) % (n))]) {
      int ant = x;
      int cur = ((((x - 1) % (n)) + (n)) % (n));
      for (int i = 1; i < n; i++) {
        if (t[cur] != -1 && t[cur] < i) break;
        res[cur] = "WB"[(res[ant] == 'B') ^ (i > k)];
        t[cur] = i;
        ant = cur;
        cur--;
        if (cur < 0) cur += n;
      }
    }
    if (s[x] != s[(x + 1) % n]) {
      int ant = x;
      int cur = (x + 1) % n;
      for (int i = 1; i < n; i++) {
        if (t[cur] != -1 && t[cur] < i) break;
        res[cur] = "WB"[(res[ant] == 'B') ^ (i > k)];
        t[cur] = i;
        ant = cur;
        cur++;
        if (cur >= n) cur -= n;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (t[i] != -1)
      cout << res[i];
    else
      cout << s[i];
  }
  cout << '\n';
  return 0;
}
