#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
char s[MAXN];
int p[MAXN << 1], ans[MAXN];
vector<pair<int, int> > v;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) p[i] = (s[i] == 'W');
  for (int i = n + 1; i <= n + n + 1; i++) p[i] = p[i - n];
  int st = 0;
  for (int i = 1; i <= n; i++)
    if (p[i] == p[i + 1]) st = i + 1;
  if (!st) {
    if (k & 1)
      for (int i = 1; i <= n; i++) s[i] = (s[i] == 'B' ? 'W' : 'B');
    for (int i = 1; i <= n; i++) printf("%c", s[i]);
    puts("");
    return 0;
  }
  int last = -1;
  for (int i = st; i < st + n; i++) {
    if (p[i] != p[i + 1] && last == -1) last = i;
    if (p[i] == p[i + 1] && last != -1)
      v.push_back(make_pair(last, i - 1)), last = -1;
  }
  for (pair<int, int> i : v) {
    int l = i.first + 1;
    int r = i.second;
    int cnt = k;
    int now = 1;
    while (cnt && l <= r) {
      p[l] ^= now;
      p[r] ^= now;
      if (l == r) p[l] ^= now;
      l++, r--;
      cnt--;
      now ^= 1;
    }
    now ^= 1;
    for (int i = l; i <= r; i++) p[i] ^= now;
  }
  for (int i = st; i < st + n; i++)
    if (i > n)
      ans[i - n] = p[i];
    else
      ans[i] = p[i];
  for (int i = 1; i <= n; i++) printf("%c", ans[i] ? 'W' : 'B');
  puts("");
  return 0;
}
