#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, t;
  cin >> n >> t;
  char ordr[n];
  for (long long i = 0; i < n; i++) {
    cin >> ordr[i];
  }
  for (long long i = 0; i < t; i++) {
    for (long long j = n; j > 0; j--) {
      if (ordr[j] > ordr[j - 1] && j < n) {
        swap(ordr[j], ordr[j - 1]);
        j--;
      }
    }
  }
  for (long long i = 0; i < n; i++) cout << ordr[i];
  return 0;
}
