#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000007;
const long long LLINF = 1000000000000000007LL;
const double EPS = 1e-9;
const int sz = 200100;
int ar[sz], d[sz], u[sz], ans[sz];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  string s;
  cin >> n >> k >> s;
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'W') {
      ar[i] = ans[i] = 1;
    }
  }
  queue<int> q;
  for (int i = 0; i < n; ++i) {
    if (ar[i] == ar[(i + 1) % n] || ar[i] == ar[(i - 1 + n) % n]) {
      q.push(i);
      u[i] = 1;
    }
  }
  if (!q.size()) {
    for (int i = 0; i < n; ++i)
      if (k % 2) ans[i] = (ar[i] + 1) % 2;
  } else {
    while (q.size()) {
      int i = q.front();
      q.pop();
      if (!u[(i + 1) % n]) {
        u[(i + 1) % n] = 1;
        q.push((i + 1) % n);
        ans[(i + 1) % n] = ans[i];
        d[(i + 1) % n] = d[i] + 1;
      }
      if (!u[(i - 1 + n) % n]) {
        u[(i - 1 + n) % n] = 1;
        q.push((i - 1 + n) % n);
        ans[(i - 1 + n) % n] = ans[i];
        d[(i - 1 + n) % n] = d[i] + 1;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    if (d[i] <= k) {
      if (ans[i] == 0)
        cout << 'B';
      else
        cout << 'W';
    } else {
      if (k % 2) ar[i] = (ar[i] + 1) % 2;
      if (ar[i] == 0)
        cout << 'B';
      else
        cout << 'W';
    }
  }
}
