#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int n, k;
  string s;
  cin >> n >> k >> s;
  int start = -1;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    a[i] = (s[i] == 'B');
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] == a[(i - 1 + n) % n]) start = i;
  }
  if (start == -1) {
    int x = k & 1;
    for (int i = 0; i < n; ++i) {
      int cur = a[i] ^ x;
      if (cur)
        cout << 'B';
      else
        cout << 'W';
    }
    cout << '\n';
  } else {
    vector<int> cur(n, 0);
    rotate(a.begin(), a.begin() + start, a.end());
    for (int i = 1; i < n - 1; ++i) {
      if (a[i] == a[i - 1]) continue;
      int l = i - 1, r = i;
      while (r < n && a[r] != a[r - 1]) ++r;
      --r;
      for (int j = i; j < r; ++j) {
        int mn = min(j - l, r - j);
        if (k < mn)
          cur[j] = k & 1;
        else {
          if (j - l < r - j)
            cur[j] = (a[j] != a[l]);
          else
            cur[j] = (a[j] != a[r]);
        }
      }
      i = r;
    }
    int pos = (n - start) % n;
    for (int i = 0; i < n; ++i) {
      a[i] ^= cur[i];
    }
    for (int i = 0; i < n; ++i) {
      if (a[pos])
        cout << 'B';
      else
        cout << 'W';
      pos = (pos + 1) % n;
    };
    ;
    cout << '\n';
  }
}
