#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e18;
const long long mod = (long long)1e9 + 7;
const double eps = (double)1e-9;
const double pi = acos(-1.0);
const int dx[] = {0, 0, 1, 0, -1};
const int dy[] = {0, 1, 0, -1, 0};
const int N = 200500;
bool a[N], b[N], ans[N];
int n, k, st;
string s;
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >> n >> k >> s;
  for (int i = 0; i < n; i++) a[i] = (s[i] == 'W');
  if (n % 2 == 0) {
    bool ok = 1;
    for (int i = 1; i < n; i++) ok &= (a[i] != a[i - 1]);
    if (ok) {
      k &= 1;
      for (int i = 0; i < n; i++) a[i] ^= k;
      for (int i = 0; i < n; i++) cout << (a[i] ? 'W' : 'B');
      return 0;
    }
  }
  if (a[0] != a[n - 1]) {
    for (int i = 0; i < n; i++) {
      if (a[i] == a[i + 1]) {
        st = n - i - 1;
        int ptr = 0;
        for (int j = i + 1; j < n; j++) b[ptr++] = a[j];
        for (int j = 0; j <= i; j++) b[ptr++] = a[j];
        for (int j = 0; j < n; j++) a[j] = b[j];
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    int j = i;
    while (j + 1 < n && a[j] != a[j + 1]) j++;
    int l = i, r = j;
    for (int it = 1; it <= k; it++) {
      l++, r--;
      if (l > r) {
        l--, r++;
        break;
      }
    }
    for (int it = l, val = a[i]; it <= r; it++, val ^= 1) ans[it] = val;
    for (int it = i; it < l; it++) ans[it] = a[i];
    for (int it = j; it > r; it--) ans[it] = a[j];
    i = j;
  }
  for (int i = 0; i < n; i++) cout << (ans[st] ? 'W' : 'B'), st = (st + 1) % n;
  return 0;
}
