#include <bits/stdc++.h>
using namespace std;
char s[100050];
int main() {
  int n, k, a, b;
  scanf("%d%d%d%d", &n, &k, &a, &b);
  bool ok = false;
  char c = 'G';
  char d = 'B';
  if (a < b) {
    int aaa = b;
    b = a;
    a = aaa;
    c = 'B';
    d = 'G';
  }
  int w = 1;
  while (w <= n) {
    if (a == b) {
      {
        s[w++] = c;
        s[w++] = d;
      }
      a--;
      b--;
    } else {
      int zd1 = k;
      int zd2 = a - b;
      if (b == 0) {
        if (zd2 > k) {
          break;
        }
        for (int i = 1; i <= a; i++) s[w++] = c;
        a = 0;
      } else {
        int aa = k;
        int bb = a - b + 1;
        int minn = min(aa, bb);
        for (int i = 1; i <= minn; i++) s[w++] = c;
        s[w++] = d;
        b--;
        a -= minn;
      }
    }
  }
  if (w >= n) {
    for (int i = 1; i <= n; i++) {
      printf("%c", s[i]);
    }
    printf("\n");
  } else {
    printf("NO\n");
  }
}
