#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, a, b, ca = 0, cb = 0;
  cin >> n >> k >> a >> b;
  string s = "";
  while (a > 0 || b > 0) {
    bool x = (a > b || cb == k);
    if (x && a && ca < k) {
      a--;
      ca++;
      cb = 0;
      s += 'G';
    } else if (cb < k && b) {
      b--;
      cb++;
      s += 'B';
      ca = 0;
    } else {
      cout << "NO";
      return 0;
    }
  }
  cout << s;
}
