#include <bits/stdc++.h>
using namespace std;
int n, a[200005], b[200005], c[200005], k;
char ch;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> ch;
    if (ch == 'W')
      a[i] = 1;
    else
      a[i] = 0;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] != a[i % n + 1] && a[i] != a[(i + n - 2) % n + 1]) b[i] = 1;
  }
  int rec = -1;
  for (int i = 1; i <= 2 * n; i++) {
    int pos = (i - 1) % n + 1;
    if (b[pos] == 1) {
      if (rec > 0) c[pos] = rec;
    } else {
      rec = pos;
    }
  }
  if (rec == -1) {
    for (int i = 1; i <= n; i++) {
      if ((a[i] + k) % 2 == 1)
        cout << 'W';
      else
        cout << 'B';
    }
    cout << '\n';
    return 0;
  }
  rec = -1;
  for (int i = 2 * n; i > 0; i--) {
    int pos = (i - 1) % n + 1;
    if (b[pos] == 1) {
      if (rec > 0)
        if (min((pos - c[pos] + n - 1) % n, (-pos + c[pos] + n - 1) % n) + 1 >
            min((rec - pos + n - 1) % n, (-rec + pos + n - 1) % n) + 1) {
          c[pos] = rec;
        }
    } else {
      rec = pos;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (b[i] == 1) {
      if (min(((i - c[i] + n - 1) % n + 1), ((c[i] - i + n - 1) % n + 1)) <=
          k) {
        if (a[c[i]] == 1)
          cout << 'W';
        else
          cout << 'B';
      } else {
        if ((a[i] + k) % 2 == 1)
          cout << 'W';
        else
          cout << 'B';
      }
    } else {
      if (a[i] == 1) {
        cout << 'W';
      } else
        cout << 'B';
    }
  }
}
