#include <bits/stdc++.h>
using namespace std;
string s;
queue<int> que;
int n, k, vis[200005];
int main() {
  cin >> n >> k >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == s[(i - 1 + n) % n] || s[i] == s[(i + 1) % n])
      que.push(i);
    else
      vis[i] = -1;
  }
  while (!que.empty()) {
    int pi = que.front();
    que.pop();
    if (vis[(pi - 1 + n) % n] == -1) {
      vis[(pi - 1 + n) % n] = vis[pi] + 1;
      que.push((pi - 1 + n) % n);
    }
    if (vis[(pi + 1) % n] == -1) {
      vis[(pi + 1) % n] = vis[pi] + 1;
      que.push((pi + 1) % n);
    }
  }
  for (int i = 0; i < n; i++) {
    if (vis[i] == -1 || k < vis[i])
      cout << (char)(k & 1 ? 'W' + 'B' - s[i] : s[i]);
    else
      cout << (char)(vis[i] & 1 ? 'W' + 'B' - s[i] : s[i]);
  }
  cout << endl;
  return 0;
}
