#include <bits/stdc++.h>
using namespace std;
int II() {
  int q;
  scanf("%d", &q);
  return q;
}
void solve() {
  long long N, K, a, b;
  cin >> N >> K >> a >> b;
  if ((((a + 1) * K) < b) or (((b + 1) * K) < a)) {
    cout << "NO" << endl;
    return;
  }
  if (a >= b) {
    string s = "";
    while (a > 0) {
      long long cnt = min(a, K);
      a -= cnt;
      while (cnt--) s += 'G';
      if (b > 0) {
        s += 'B';
        b--;
      }
    }
    string ss = "";
    if (b > 0) {
      for (long long i = 1; i < s.size(); i++) {
        if (s[i - 1] == 'G' && s[i] == 'G' && b > 0) {
          ss += s[i - 1];
          long long cnt = min(b, K);
          b -= cnt;
          while (cnt--) ss += 'B';
        } else
          ss += s[i - 1];
      }
      ss += s.back();
    } else
      ss = s;
    cout << ss << endl;
  } else {
    string s = "";
    swap(a, b);
    while (a > 0) {
      long long cnt = min(a, K);
      a -= cnt;
      while (cnt--) s += 'B';
      if (b > 0) {
        s += 'G';
        b--;
      }
    }
    string ss = "";
    if (b > 0) {
      for (long long i = 1; i < s.size(); i++) {
        if (s[i - 1] == 'B' && s[i] == 'B' && b > 0) {
          ss += s[i - 1];
          long long cnt = min(b, K);
          b -= cnt;
          while (cnt--) ss += 'G';
        } else
          ss += s[i - 1];
      }
      ss += s.back();
    } else
      ss = s;
    cout << ss << endl;
  }
}
int32_t main() {
  long long tt;
  tt = 1;
  long long cas = 1;
  while (tt--) {
    solve();
  }
}
