#include <bits/stdc++.h>
using namespace std;
long long int fastMax(long long int x, long long int y) {
  return (((y - x) >> (32 - 1)) & (x ^ y)) ^ y;
}
long long int fastMin(long long int x, long long int y) {
  return (((y - x) >> (32 - 1)) & (x ^ y)) ^ x;
}
const long long int MAXN = 2e5 + 10;
bool mark[MAXN];
char inv(char ch) { return ((ch == 'B') ? 'W' : 'B'); }
void solve() {
  long long int n, k;
  cin >> n >> k;
  string second;
  cin >> second;
  bool alt = 0;
  for (long long int i = 0; i < n; i++) {
    if (second[(n + i - 1) % n] == second[i]) {
      mark[i] = mark[(n + i - 1) % n] = 1;
      alt = 0;
    }
  }
  if (alt) {
    if (k & 1)
      for (long long int i = 0; i < n; i++) cout << inv(second[i]);
    else
      cout << second;
    return;
  }
  for (long long int l = 0; l < n; l++) {
    if (!mark[l] && mark[(n + l - 1) % n]) {
      long long int r = l;
      long long int d1 = 1, d2 = 1;
      while (!mark[(r + 1) % n]) r = (r + 1) % n, d2++;
      for (long long int i = l; i != (r + 1) % n; i = (i + 1) % n) {
        if (d1 < d2) {
          if (d1 <= k) {
            second[i] = second[(n + l - 1) % n];
          } else {
            second[i] = ((k & 1) ? inv(second[i]) : second[i]);
          }
        } else {
          if (d2 <= k) {
            second[i] = second[(r + 1) % n];
          } else {
            second[i] = ((k & 1) ? inv(second[i]) : second[i]);
          }
        }
        d1++, d2--;
      }
    }
  }
  cout << second;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t;
  t = 1;
  for (long long int i = (1); i <= (t); ++i) {
    solve();
  }
}
