#include <bits/stdc++.h>
using namespace std;
const double PI = atan(1.0) * 4;
const int64_t INF = 100000000000000003;
const int32_t LOG = 21;
const long long int BIG = pow(2, 20);
long long int arr[200005];
long long int fix[200005];
bool par[200005];
bool next_par[200005];
long long int val[200005];
long long int len[200005];
bool alternate(long long int n) {
  if (n & 1) return false;
  long long int x = arr[1];
  for (long long int i = 2; i < n + 1; i++) {
    x = 1 - x;
    if (arr[i] != x) return false;
  }
  return true;
}
long long int aft(long long int i, long long int n) {
  if (i != n) return i + 1;
  return 1;
}
long long int bef(long long int i, long long int n) {
  if (i != 1) return i - 1;
  return n;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  string str;
  cin >> str;
  for (long long int i = 0; i < str.length(); i++) {
    if (str[i] == 'B')
      arr[i + 1] = 1;
    else
      arr[i + 1] = 0;
  }
  arr[n + 1] = arr[1];
  arr[0] = arr[n];
  if (alternate(n)) {
    bool g = false;
    if (!(k & 1)) g = true;
    for (long long int i = 1; i < n + 1; i++) {
      if (!g) arr[i] = 1 - arr[i];
    }
    for (long long int i = 1; i < n + 1; i++) {
      if (arr[i] == 0)
        cout << "W";
      else
        cout << "B";
    }
    cout << '\n';
    return 0;
  }
  for (long long int i = 1; i < n + 1; i++) {
    if (arr[i - 1] == arr[i] || arr[i] == arr[i + 1]) fix[i] = -1;
  }
  for (long long int i = 1; i < n + 1; i++) {
    if (fix[i] == 0 && fix[bef(i, n)] == -1) {
      long long int prev = arr[bef(i, n)];
      long long int start = i;
      long long int j = start;
      long long int cur = 1;
      par[j] = prev;
      val[j] = cur;
      while (fix[j] != -1) {
        j = aft(j, n);
        if (fix[j] == -1) break;
        cur++;
        par[j] = prev;
        val[j] = cur;
      }
      long long int later = arr[j];
      j = start;
      next_par[j] = later;
      len[j] = cur;
      while (fix[j] != -1) {
        j = aft(j, n);
        if (fix[j] == -1) break;
        next_par[j] = later;
        len[j] = cur;
      }
      if (i > j) break;
      i = j - 1;
    }
  }
  for (long long int i = 1; i < n + 1; i++) {
    if (fix[i] == -1) {
      if (arr[i] == 0)
        cout << "W";
      else
        cout << "B";
      continue;
    }
    long long int tot = len[i];
    long long int pos = val[i];
    long long int x = par[i];
    long long int y = next_par[i];
    if (tot & 1) {
      long long int to_convert = min(pos, tot + 1 - pos);
      if (to_convert <= k) {
        if (x == 0)
          cout << "W";
        else
          cout << "B";
      } else {
        long long int xy = arr[i];
        if (k & 1) xy = 1 - xy;
        if (xy == 0)
          cout << "W";
        else
          cout << "B";
      }
    } else {
      long long int to_convert = min(pos, tot + 1 - pos);
      if (to_convert <= k) {
        if (pos <= tot / 2) {
          if (x == 0)
            cout << "W";
          else
            cout << "B";
        } else {
          if (y == 0)
            cout << "W";
          else
            cout << "B";
        }
      } else {
        long long int ulta = arr[i];
        if (k & 1) ulta = 1 - ulta;
        if (ulta == 0)
          cout << "W";
        else
          cout << "B";
      }
    }
  }
  cout << '\n';
  return 0;
}
