#include <bits/stdc++.h>
using namespace std;
const int INTMAX = 2147483647;
const long long LONGMAX = 9223372036854775807;
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int w[100001];
int main() {
  ios::sync_with_stdio(false);
  int n, k, a, b, p = 0, r = 0;
  string ans = "";
  cin >> n >> k >> a >> b;
  if ((!a && b > k) || (!b && a > k))
    return cout << "NO\n", 0;
  else if (k == 1 && abs(a - b) > 1)
    return cout << "NO\n", 0;
  if (!a) {
    for (int i = 0; i < b; i++) cout << "B";
    return 0;
  } else if (!b) {
    for (int i = 0; i < a; i++) cout << "G";
    return 0;
  }
  bool bb = a <= b;
  int now, tot = 0, cmp = min(a, b) + 1, rem = bb ? b % a : a % b,
           cnt = bb ? b : a;
  for (int i = 0; i < cmp; i++) {
    now = bb ? b / a : a / b;
    if (now > cnt) now = cnt;
    w[i] = now;
    cnt -= now;
    if (cnt < 0) cnt = 0;
  }
  for (int i = 0; i < cmp && cnt; i++, cnt--) w[i]++;
  if (w[0] > k) return cout << "NO\n", 0;
  if (bb) {
    for (int i = 0; i < cmp; i++) {
      for (int j = 0; j < w[i]; j++) cout << "B";
      if (a) a--, cout << "G";
    }
  } else {
    for (int i = 0; i < cmp; i++) {
      for (int j = 0; j < w[i]; j++) cout << "G";
      if (b) b--, cout << "B";
    }
  }
}
