#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chmax(T& a, const T& b) {
  return a < b ? (a = b, true) : false;
}
template <typename T>
bool chmin(T& a, const T& b) {
  return b < a ? (a = b, true) : false;
}
long long N, K, A, B;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cin >> N >> K >> A >> B;
  if (A >= B && A > (B + 1) * K) {
    cout << "NO" << endl;
    return 0;
  }
  if (B >= A && B > (A + 1) * K) {
    cout << "NO" << endl;
    return 0;
  }
  string ans;
  long long curr_a = A, curr_b = B;
  bool f = A >= B;
  while ((long long)ans.size() < N) {
    if (f) {
      long long t = min({K, curr_a, max(1ll, curr_a - curr_b * K)});
      ans += string(t, 'G');
      curr_a -= t;
      f = !f;
    } else {
      long long t = min({K, curr_b, max(1ll, curr_b - curr_a * K)});
      ans += string(t, 'B');
      curr_b -= t;
      f = !f;
    }
  }
  if ((long long)ans.size() == N) {
    cout << ans << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
