#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int t;
  string s;
  string res;
  cin >> n >> t >> s;
  vector<char> c;
  for (int i = 0; i < s.size(); i++) {
    c.push_back(s.at(i));
  }
  while (t != 0) {
    for (int i = 0; i < c.size() - 1; i++) {
      if (c[i] == 'B' && c[i + 1] != 'B') {
        swap(c[i], c[i + 1]);
        i++;
      }
    }
    t--;
  }
  for (int i = 0; i < c.size(); i++) {
    res += c[i];
  }
  cout << res;
}
