#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 10;
const char ans[2] = {'B', 'W'};
int fix[N], L[N], R[N];
char s[N];
int main(void) {
  int n, k;
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  memcpy(s + n + 1, s + 1, sizeof(char) * n);
  for (int i = 1, j; i <= (2 * n); i++) {
    for (j = i; s[j + 1] == s[i] && j < (2 * n); j++)
      ;
    if (i != j) {
      for (int k = i; k <= j; k++) {
        fix[k] = 1;
      }
    }
  }
  int pre = -1, nxt = -1;
  for (int i = 1; i <= (2 * n); i++) {
    if (fix[i]) pre = i;
    L[i] = pre;
  }
  for (int i = 2 * n; i >= 1; i--) {
    if (fix[i]) nxt = i;
    R[i] = nxt;
  }
  for (int i = 1; i <= n; i++) {
    if (L[i] == -1) L[i] = L[i + n];
  }
  for (int i = 1; i <= n; i++) {
    if (L[i] == -1 || R[i] == -1) {
      printf("%c", ans[((s[i] == 'W') + k) & 1]);
    } else {
      int l = i - L[i], r = R[i] - i;
      if (l < 0) l += n;
      if (k < l) {
        if (k < r) {
          printf("%c", ans[((s[i] == 'W') + k) & 1]);
        } else {
          printf("%c", s[R[i]]);
        }
      } else {
        if (k < r) {
          printf("%c", s[L[i]]);
        } else {
          if (l < r)
            printf("%c", s[L[i]]);
          else
            printf("%c", s[R[i]]);
        }
      }
    }
  }
  printf("\n");
}
