#include <bits/stdc++.h>
using namespace std;
inline void failure() {
  cout << "NO" << endl;
  exit(0);
}
int main() {
  int n, k, a, b;
  cin >> n >> k >> a >> b;
  string ans = "";
  int cont_count = 0;
  for (int i = 1; i <= n; i++) {
    if (cont_count == k) {
      if (ans.back() == 'G') {
        if (b)
          ans.push_back('B');
        else
          failure();
        b--;
      } else {
        if (a)
          ans.push_back('G');
        else
          failure();
        a--;
      }
      cont_count = 1;
    } else {
      if (a == b && b == 0) failure();
      if (a > b) {
        a--;
        if (!ans.empty() && ans.back() == 'G')
          cont_count++;
        else
          cont_count = 1;
        ans.push_back('G');
      } else {
        b--;
        if (!ans.empty() && ans.back() == 'B')
          cont_count++;
        else
          cont_count = 1;
        ans.push_back('B');
      }
    }
  }
  cout << ans << endl;
  return 0;
}
