#include <bits/stdc++.h>
using namespace std;
int read() {
  int r = 0, t = 1, c = getchar();
  while (c < '0' || c > '9') {
    t = c == '-' ? -1 : 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    r = r * 10 + c - 48;
    c = getchar();
  }
  return r * t;
}
const int N = 2000010;
int n, k, L, R;
char s[N], c[N];
inline int pre(int k) {
  k--;
  return k == 0 ? k + n : k;
}
inline int nex(int k) {
  k++;
  return k > n ? k - n : k;
}
int main() {
  n = read();
  k = read();
  scanf("%s", s + 1);
  for (int i = (1), end_i = (n); i <= end_i; i++)
    if (s[i] == 'W')
      s[i] = 0;
    else
      s[i] = 1;
  for (int i = (1), end_i = (n); i <= end_i; i++)
    if (s[i] == s[nex(i)]) {
      L = i;
      R = nex(i);
      while (s[nex(R)] == s[L] && R != L) R = nex(R);
      break;
    }
  if (!L) {
    for (int i = (1), end_i = (n); i <= end_i; i++)
      putchar((s[i] ^ (k & 1)) == 0 ? 'W' : 'B');
    putchar(10);
    return 0;
  }
  c[L] = s[L];
  for (int i = nex(L); i != L;)
    if (s[i] == s[pre(i)] || s[i] == s[nex(i)]) {
      c[i] = s[i];
      i = nex(i);
    } else {
      int j = i, l = 1;
      while (s[nex(j)] != s[nex(nex(j))]) {
        j = nex(j);
        l++;
      }
      int s0 = s[pre(i)], s1 = s[nex(j)];
      j = i;
      for (int o = (1), end_o = (l); o <= end_o; o++) {
        int d1 = o, d2 = l - o + 1;
        if (min(d1, d2) <= k) {
          if (d1 <= d2)
            c[j] = s0;
          else
            c[j] = s1;
        } else
          c[j] = s[j] ^ (k & 1);
        j = nex(j);
      }
      i = j;
    }
  for (int i = (1), end_i = (n); i <= end_i; i++)
    putchar(c[i] == 0 ? 'W' : 'B');
  putchar(10);
  return 0;
}
