#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, a, b;
  char str[100005];
  cin >> n >> k >> a >> b;
  int x = 0, y = 0, j = 0;
  for (int i = 0; i < n; i++) {
    if (a <= b) {
      if (y < k) {
        str[j++] = 'B';
        y++;
        b--;
        x = 0;
      } else if (a > 0) {
        str[j++] = 'G';
        a--;
        x++;
        y = 0;
      }
    } else if (a >= b) {
      if (x < k) {
        str[j++] = 'G';
        a--;
        x++;
        y = 0;
      } else if (b > 0) {
        str[j++] = 'B';
        y++;
        b--;
        x = 0;
      }
    }
  }
  str[j] = '\0';
  if (j != n)
    cout << "NO" << endl;
  else
    cout << str << endl;
  return 0;
}
