#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
char s[N];
int pos = 0;
int aa, bb;
int main() {
  ios_base::sync_with_stdio(0);
  s[N] = '\0';
  int n, k, a, b;
  cin >> n >> k >> a >> b;
  int bput = 0;
  while (1) {
    if (a == 0 || b == 0) {
      if (a > k || b > k) {
        cout << "NO";
        return 0;
      }
      while (a > 0) {
        s[pos++] = 'G';
        a--;
      }
      while (b > 0) {
        s[pos++] = 'B';
        b--;
      }
      cout << s;
      return 0;
    } else if ((b >= a && bb < k) || bput) {
      s[pos++] = 'B';
      b--;
      bb++;
      aa = 0;
      bput = 0;
    } else if (aa < k) {
      s[pos++] = 'G';
      a--;
      aa++;
      bb = 0;
    } else {
      bput = 1;
    }
  }
  return 0;
}
