#include <bits/stdc++.h>
using namespace std;
int n, k;
string str, amid;
string get(string s, int id) {
  string ret = "";
  for (int i = id; i < n; i++) ret += s[i];
  for (int i = 0; i < id; i++) ret += s[i];
  ret += s[id];
  ret += s[id];
  return ret;
}
bool can(int i) {
  if (str[i] == str[i - 1]) return 1;
  if (str[i] == str[i + 1]) return 1;
  return 0;
}
char flip(char c) {
  if (c == 'W') return 'B';
  return 'W';
}
void go(int st, int en) {
  char s = flip(str[st]);
  char e = flip(str[en]);
  int rem = k;
  while (st <= en && rem) {
    str[st] = s;
    st++;
    str[en] = e;
    en--;
    rem--;
  }
  if (k % 2 == 0) return;
  while (st <= en) {
    str[st] = flip(str[st]);
    st++;
  }
}
int main() {
  scanf("%d%d", &n, &k);
  cin >> str;
  amid = str;
  int id = -1;
  str = amid;
  for (int i = 0; i < n; i++) {
    int a = (i + 1) % n;
    if (str[i] == str[a]) {
      id = i;
      break;
    }
  }
  if (id == -1) {
    if (k % 2 == 0)
      cout << amid << '\n';
    else {
      for (int i = 0; i < n; i++) cout << flip(amid[i]);
      cout << '\n';
    }
    return 0;
  }
  str = get(amid, id);
  for (int i = 1; i < n + 2; i++) {
    int st = i;
    while (i < n + 1 && can(i)) i++;
    if (i == n + 1) break;
    st = i;
    while (i < n + 1 && !can(i)) i++;
    int en = i - 1;
    go(st, en);
  }
  for (int i = n - id; i < n; i++) cout << str[i];
  for (int i = 0; i < n - id; i++) cout << str[i];
  cout << '\n';
}
