#include <bits/stdc++.h>
using namespace std;
int rr[200005], ll[200005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k, start_hr, start_hl;
  string s;
  cin >> n >> k >> s;
  bool flag = true;
  for (int i = 0; i < n; i++) {
    int l = i - 1;
    if (l < 0) l = n - 1;
    if (s[i] == s[l]) {
      flag = false;
      start_hr = i;
      start_hl = l;
    }
  }
  if (flag) {
    if (k % 2 == 0) {
      cout << s << endl;
    } else {
      for (int i = 0; i < n; i++) {
        if (s[i] == 'W')
          s[i] = 'B';
        else
          s[i] = 'W';
      }
      cout << s << endl;
    }
  } else {
    int sum = 0;
    char last = s[start_hr];
    ll[start_hr] = sum;
    for (int i = start_hr + 1; i != start_hr; i++) {
      if (i == n) {
        i = 0;
        if (i == start_hr) break;
      }
      if (s[i] != last) {
        sum++;
        ll[i] = sum;
        last = s[i];
      } else {
        sum = 0;
        ll[i] = 0;
      }
    }
    sum = 0;
    last = s[start_hl];
    rr[start_hl] = sum;
    for (int i = start_hl - 1; i != start_hl; i--) {
      if (i == -1) {
        i = n - 1;
        if (i == start_hl) break;
      }
      if (s[i] != last) {
        sum++;
        rr[i] = sum;
        last = s[i];
      } else {
        sum = 0;
        rr[i] = 0;
      }
    }
    for (int i = 0; i < n; i++) {
      int change = min(ll[i], rr[i]);
      if (change <= k) {
        if (change % 2) {
          if (s[i] == 'W')
            s[i] = 'B';
          else
            s[i] = 'W';
        }
      } else {
        if (k % 2) {
          if (s[i] == 'W')
            s[i] = 'B';
          else
            s[i] = 'W';
        }
      }
    }
    cout << s << endl;
  }
  return 0;
}
