#include <bits/stdc++.h>
using namespace std;
string str, str1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k, a, b;
  bool f = 0;
  string str = "";
  cin >> n >> k >> a >> b;
  if (a > b) {
    swap(a, b);
    f = 1;
  }
  int lefta = a, leftb = b;
  int nb = ceil((double)b / k);
  int na = ceil((double)a / k);
  if (nb == 1) {
    for (long long i = 1; i <= b; i++) str += 'B';
    for (long long i = 1; i <= a; i++) str += 'G';
    if (f) {
      for (long long i = 0; i <= n - 1; i++) {
        if (str[i] == 'B')
          str[i] = 'G';
        else if (str[i] == 'G')
          str[i] = 'B';
      }
    }
    cout << str << endl;
    return 0;
  }
  if (a < nb - 1 || a > (k * nb)) {
    cout << "NO\n";
    return 0;
  }
  int last = 0;
  if (na == nb) {
    na = nb - 1;
    last = a - (nb - 1) * k;
  }
  lefta -= last;
  a -= last;
  int eacha = (a / (nb - 1));
  int xtra = (a - eacha * (nb - 1));
  int moreallowed = k - eacha;
  while (lefta > 0 || leftb > 0) {
    if (leftb <= 0) break;
    if (leftb >= k) {
      for (long long i = 1; i <= k; i++) str += 'B';
      leftb -= k;
    } else {
      for (long long i = 1; i <= leftb; i++) str += 'B';
      leftb = 0;
    }
    if (lefta <= 0) break;
    if (lefta)
      for (long long i = 1; i <= eacha; i++) str += 'G';
    lefta -= eacha;
    for (int i = 1; xtra > 0 && i <= moreallowed; i++) {
      xtra--;
      lefta--;
      str += 'G';
    }
  }
  for (long long i = 1; i <= last; i++) str += 'G';
  if (f) {
    for (long long i = 0; i <= n - 1; i++) {
      if (str[i] == 'B')
        str[i] = 'G';
      else if (str[i] == 'G')
        str[i] = 'B';
    }
  }
  cout << str << endl;
  return 0;
}
