#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int CNT[2];
void addSymb(string &s, int cnt, char c) {
  for (int i = 0; i < cnt; i++) {
    if (CNT[c - 'A'] - 1 >= 0) {
      s += c;
      CNT[c - 'A']--;
    }
  }
}
int main() {
  long long n, k, a, b;
  cin >> n >> k >> a >> b;
  bool swapped = false;
  if (b < a) {
    swapped = true;
    swap(a, b);
  }
  CNT[0] = a;
  CNT[1] = b;
  int rest = b - 1 - a;
  int add = (rest <= 0) ? 0 : rest / (a + 1);
  int cnt = rest % (a + 1);
  int maxadd = (rest <= 0) ? 0 : rest / (a + 1) + (rest % (a + 1) > 0);
  string res = "";
  static_cast<void>(0);
  static_cast<void>(0);
  static_cast<void>(0);
  if (maxadd + 1 <= k) {
    addSymb(res, maxadd + 1, 'B');
    cnt--;
    if (cnt == 0) {
      maxadd--;
    }
    for (int i = 0; i < a; i++) {
      addSymb(res, 1, 'A');
      addSymb(res, maxadd + 1, 'B');
      cnt--;
      if (cnt == 0) {
        maxadd--;
      }
    }
  } else {
    puts("NO");
    return 0;
  }
  for (int i = 0; i < static_cast<int>((res).size()); i++) {
    if (swapped) {
      printf("%c", res[i] == 'B' ? 'G' : 'B');
    } else {
      printf("%c", res[i] == 'B' ? 'B' : 'G');
    }
  }
  return 0;
}
