#include <bits/stdc++.h>
int main() {
  std::ios::sync_with_stdio(false);
  int n, k, a, b;
  std::cin >> n >> k >> a >> b;
  std::string ans;
  if (a < b) {
    ans = "B";
    --b;
  } else {
    ans = "G";
    --a;
  }
  int row = 1;
  int got = 1;
  while (got < n) {
    char last = ans[ans.length() - 1];
    if (a > b) {
      if (last != 'G' || (last == 'G' && row < k)) {
        if (last != 'G')
          row = 1;
        else
          ++row;
        ans += "G";
        ++got;
        --a;
      } else {
        if (b > 0) {
          row = 1;
          ans += "B";
          --b;
          ++got;
        } else {
          std::cout << "NO\n";
          return 0;
        }
      }
    } else {
      if (last != 'B' || (last == 'B' && row < k)) {
        if (last != 'B')
          row = 1;
        else
          ++row;
        --b;
        ++got;
        ans += "B";
      } else {
        if (a > 0) {
          row = 1;
          ans += "G";
          --a;
          ++got;
        } else {
          std::cout << "NO" << std::endl;
          return 0;
        }
      }
    }
  }
  std::cout << ans << std::endl;
  return 0;
}
