#include <bits/stdc++.h>
using namespace std;
const int N5 = 1e5 + 15;
int n, k, a, b;
char B = 'B', G = 'G';
char ans[N5];
int main() {
  cin >> n >> k >> a >> b;
  ++k;
  if (a > b) swap(a, b), swap(G, B);
  for (int i = 0; i < n; ++i) ans[i] = B;
  for (int i = k - 1; i < n; i += k) ans[i] = G, --a;
  if (a < 0) {
    cout << "NO";
    return 0;
  }
  for (int i = 0; i < k && a; ++i)
    for (int j = i; j < n && a; j += k)
      if (ans[j] == B) {
        ans[j] = G;
        --a;
      }
  cout << ans;
  return 0;
}
