#include <bits/stdc++.h>
using namespace std;
char str[100005], tt[3] = "GB";
int main() {
  long long int n, k, a, b, i, j, p, q, x, y;
  cin >> n >> k >> a >> b;
  if (b > a) {
    tt[0] = 'B', tt[1] = 'G';
    a = a + b;
    b = a - b;
    a = a - b;
  }
  if (n == 1) {
    printf("%c\n", tt[0]);
    return 0;
  }
  if (a > (b + 1) * k) {
    printf("NO\n");
    return 0;
  }
  p = q = i = 0;
  while (a != b) {
    if (p < k) {
      str[i++] = tt[0];
      p++;
      a--;
    } else {
      str[i++] = tt[1];
      p = 0;
      b--;
    }
  }
  x = 0;
  if (p == k) x = 1;
  while (i < n) {
    str[i++] = tt[x];
    x ^= 1;
  }
  str[i] = '\0';
  printf("%s\n", str);
  return 0;
}
