#include <bits/stdc++.h>
using namespace std;
long long n, k;
string second;
vector<pair<long long, long long> > ar;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k >> second;
  second = second[n - 1] + second + second[0];
  for (int i = 1; i <= n; i++) {
    long long j = i;
    for (; j <= n; j++)
      if (!(second[j - 1] == second[j + 1] && second[j] != second[j - 1])) {
        if (i != j) ar.push_back({i, j - 1});
        i = j;
        break;
      }
    if (j == n + 1) ar.push_back({i, j - 1}), i = j;
  }
  if (ar.size() == 1 && ar[0].first == 1 && ar[0].second == n) {
    if (k % 2 == 1) {
      for (int i = 1; i <= n; i++)
        if (second[i] == 'W')
          second[i] = 'B';
        else
          second[i] = 'W';
    }
  } else if (ar.size()) {
    long long ck = 0;
    if (ar.size() >= 2 && ar[0].first == 1 && ar[ar.size() - 1].second == n) {
      long long l = ar[ar.size() - 1].first - 1, r = ar[0].second + 1;
      long long st = ar[ar.size() - 1].first, ed = ar[0].second, ct = k;
      while (ct > 0) {
        second[st] = second[l], second[ed] = second[r];
        ct--;
        st = st % n + 1, ed = (ed - 2 + n) % n + 1;
        if ((st - 2 + n) % n + 1 == ed % n + 1 || ed % n + 1 == st) break;
      }
      if (k % 2 == 1 &&
          !((st - 2 + n) % n + 1 == ed % n + 1 || ed % n + 1 == st)) {
        ed = ed % n + 1;
        for (int i = st; i != ed; i = i % n + 1) {
          if (second[i] == 'W')
            second[i] = 'B';
          else
            second[i] = 'W';
        }
      }
      ck = 1;
    }
    for (int i = 0; i < ar.size(); i++) {
      if (ck) {
        if (i == 0 || i == ar.size() - 1) continue;
      }
      long long l = ar[i].first - 1, r = ar[i].second + 1;
      long long st = ar[i].first, ed = ar[i].second, ct = k;
      while (ct > 0) {
        second[st] = second[l], second[ed] = second[r];
        ct--, st += 1, ed -= 1;
        if (st - 1 == ed + 1 || ed + 1 == st) break;
      }
      if (k % 2 == 1 && !(st - 1 == ed + 1 || ed + 1 == st)) {
        ed = ed % n + 1;
        for (int i = st; i != ed; i = i % n + 1) {
          if (second[i] == 'W')
            second[i] = 'B';
          else
            second[i] = 'W';
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) cout << second[i];
  return 0;
}
