#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, a, b, cnt_g = 0, cnt_b = 0;
  cin >> n >> k >> a >> b;
  string s = "";
  for (int i = 0; i < n; i++) {
    if (a >= b) {
      if (cnt_g < k && a) {
        s += "G";
        a--;
        cnt_g++, cnt_b = 0;
      } else if (cnt_b < k && b) {
        s += "B";
        b--;
        cnt_b++, cnt_g = 0;
      }
    } else {
      if (cnt_b < k && b) {
        s += "B";
        b--;
        cnt_b++, cnt_g = 0;
      } else if (cnt_g < k && a) {
        s += "G";
        a--;
        cnt_g++, cnt_b = 0;
      }
    }
  }
  if (s.size() == n)
    cout << s;
  else
    cout << "NO";
  cout << endl;
  return 0;
}
