#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k, a, b;
  cin >> n >> k >> a >> b;
  string solve = "";
  int black = 0;
  int green = 0;
  for (int i = 0; i < n; i++) {
    if (a > b) {
      if (green < k) {
        solve += "G";
        black = 0;
        green++;
        a--;
      } else {
        green = 0;
        if (b > 0) {
          solve += "B";
          b--;
          black = 1;
          green = 0;
        } else {
          cout << "NO";
          return 0;
        }
      }
    } else {
      if (black < k) {
        solve += "B";
        black++;
        green = 0;
        b--;
      } else {
        black = 0;
        if (a > 0) {
          solve += "G";
          a--;
          green = 1;
          black = 0;
        } else {
          cout << "NO";
          return 0;
        }
      }
    }
  }
  cout << solve << '\n';
}
