#include <bits/stdc++.h>
using namespace std;
const int maxV = 90010;
const int maxN = 2e5 + 10;
const int MOD = 1e9 + 7;
const long long INF = 1000000000000000010LL;
const int inf = 1e9 + 10;
vector<int> p;
int a[maxN];
int u[maxN];
char s[maxN];
int n, k;
int main() {
  scanf("%d %d\n", &n, &k);
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    if (s[i] == 'B') a[i] = 1;
  }
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == a[(i - 1 + n) % n] || a[i] == a[(i + 1) % n]) {
      u[i] = 1;
      p.push_back(i);
      cnt++;
    }
  }
  if (cnt == 0) {
    for (int i = 0; i < n; i++) {
      a[i] ^= (k % 2);
    }
  } else {
    for (int i = 0; i < n; i++) {
      if (u[i]) continue;
      int pos = lower_bound(p.begin(), p.end(), i) - p.begin();
      int R = (pos == p.size()) ? p[0] : p[pos];
      int L = (pos == 0) ? p.back() : p[pos - 1];
      int Rlen = (R - i + n) % n;
      int Llen = (i - L + n) % n;
      if (Rlen > k && Llen > k) {
        a[i] ^= (k % 2);
      } else if (Llen < Rlen) {
        a[i] = a[L];
      } else {
        a[i] = a[R];
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i]) {
      putchar('B');
    } else {
      putchar('W');
    }
  }
  cout << endl;
  return 0;
}
