#include <bits/stdc++.h>
using namespace std;
template <typename U, typename V>
void Min(U &a, const V &b) {
  if (a > b) a = b;
}
template <typename U, typename V>
void Max(U &a, const V &b) {
  if (a < b) a = b;
}
template <typename U, typename V>
void add(U &a, const V &b) {
  a = (a + b) % 1000000007;
}
template <typename U>
U gcd(U a, U b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a >= b)
    return gcd(a % b, b);
  else
    return gcd(a, b % a);
}
int pow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = 1LL * ans * a % 1000000007;
    a = 1LL * a * a % 1000000007;
    b >>= 1;
  }
  return ans;
}
int pow(int a, int b, int c) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = 1LL * ans * a % c;
    a = 1LL * a * a % c;
    b >>= 1;
  }
  return ans;
}
char s[200005], t[200005];
void change(char &c) {
  if (c == 'B')
    c = 'W';
  else
    c = 'B';
}
int main() {
  int T, i, j, k, m, K, n;
  scanf("%d%d%s", &n, &K, s);
  int rt = -1;
  for (int i = 0; i < n - 1; i++)
    if (s[i] != s[n - 1]) {
      rt = i;
      break;
    }
  if (rt == -1) {
    puts(s);
    return 0;
  }
  int root = -1;
  for (int i = 1; i < n; i++) {
    k = (i + rt) % n;
    j = k - 1;
    if (j < 0) j += n;
    if (s[j] == s[k]) {
      root = j;
      break;
    }
  }
  if (root == -1) {
    K &= 1;
    if (K) {
      for (int i = 0; i < n; i++)
        if (s[i] == 'B')
          s[i] = 'W';
        else
          s[i] = 'B';
    }
    puts(s);
    return 0;
  }
  rt = root;
  for (int i = 0; i < n; i++) t[i] = s[(i + rt) % n];
  t[n] = t[0];
  for (int i = 1; i < n; i++)
    if (t[i] != t[i - 1] && t[i] != t[i + 1]) {
      j = i;
      while (j < n && t[j] != t[j + 1]) j++;
      int len = min(K, (j - i) / 2);
      if (len == 0) {
        t[i] = t[i - 1];
        i = j;
        continue;
      }
      for (int k = i; k < i + len; k++) t[k] = t[i - 1];
      for (int k = j - len; k < j; k++) t[k] = t[j];
      if (K & 1)
        for (int k = i + len; k < j - len; k++) change(t[k]);
      if (K > len && (j - i) % 2) t[i + len] = t[i];
      i = j;
    }
  for (int i = 0; i < n; i++) printf("%c", t[(i - rt + n) % n]);
  puts("");
}
