#include <bits/stdc++.h>
int main() {
  std::ios_base::sync_with_stdio(false);
  long long n, k, a, b;
  std::cin >> n >> k >> a >> b;
  if (a > (b + 1) * k || b > (a + 1) * k) {
    std::cout << "NO";
  } else {
    char last = 0;
    int inrow = 0;
    while (n--) {
      char next = a > b ? 'G' : 'B';
      if (next != last) inrow = 0;
      if (++inrow > k) {
        next ^= 'B' ^ 'G';
        inrow = 1;
      }
      if (next == 'G')
        a--;
      else
        b--;
      last = next;
      std::cout << last;
    }
  }
  return 0;
}
