#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
long long pw(long long a, long long b) {
  long long r = 1;
  while (b > 0) {
    if (b & 1) {
      r = (r * a) % MOD;
    }
    b = b >> 1;
    a = (a * a) % MOD;
  }
  return (r) % MOD;
}
int main() {
  int n, k, a[2];
  cin >> n >> k >> a[0] >> a[1];
  char ans[100100];
  int f = 0;
  int prev = a[0] >= a[1] ? 0 : 1, ct = 0;
  int taken = 0;
  int now = 0;
  for (int i = 0; i < n; i++) {
    if (a[0] >= a[1]) {
      now = 0;
      if (prev == now && ct >= k) {
        now = 1;
      }
    } else {
      now = 1;
      if (prev == now && ct >= k) {
        now = 0;
      }
    }
    if (a[now]) {
      a[now]--;
      if (prev == now) {
        ct++;
      } else {
        ct = 1;
      }
    } else {
      f = 1;
      break;
    }
    prev = now;
    if (!prev)
      ans[i] = 'G';
    else
      ans[i] = 'B';
  }
  if (!f) {
    for (int i = 0; i < n; i++) {
      cout << ans[i];
    }
    printf("\n");
  } else {
    cout << "NO\n";
  }
  return 0;
}
