#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int rt = 0;
  for (; (s[rt] == s[(((rt)-1 + n) % n)] || s[rt] != s[(((rt) + 1) % n)]) &&
         rt < n;
       ++rt)
    ;
  if (rt == n) {
    if (k % 2 && s.front() != s.back()) {
      for (auto& i : s) {
        i = 'W' + 'B' - i;
      }
    }
    cout << s << '\n';
    return 0;
  }
  int lo = 0, hi = 0, i = rt;
  do {
    i = (((i) + 1) % n);
    for (; s[i] == s[(((i) + 1) % n)]; i = (((i) + 1) % n))
      ;
    lo = i;
    for (; s[i] != s[(((i) + 1) % n)]; i = (((i) + 1) % n))
      ;
    hi = i;
    int l = (((lo) + 1) % n), r = (((hi)-1 + n) % n);
    for (int j = 0; (((r) + 1) % n) != l && ((((((r) + 1) % n)) + 1) % n) != l;
         ++j) {
      if (j < k) {
        s[l] = s[lo];
        s[r] = s[hi];
      } else if (r == l && k % 2) {
        s[l] = 'W' + 'B' - s[l];
      } else if (k % 2) {
        s[l] = 'W' + 'B' - s[l];
        s[r] = 'W' + 'B' - s[r];
      }
      l = (((l) + 1) % n);
      r = (((r)-1 + n) % n);
    }
  } while (i != rt);
  cout << s << '\n';
}
