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