#include <bits/stdc++.h>
using namespace std;
int n, k, a, b;
string s;
bool check(int &x, int &y, int a, int b) {
  if (abs(x - y) <= 1) return true;
  int prea = -1, preb = -1;
  if (x < y) {
    while (a > 1) {
      int cur = a;
      if (a % 2)
        a = max(prea, a / 2 + 1);
      else
        a = max(prea, a / 2);
      prea = max(a, cur - a);
      x++;
      if (abs(x - y) <= 1) return true;
    }
  } else {
    while (b > 1) {
      int cur = b;
      if (b % 2)
        b = max(preb, b / 2 + 1);
      else
        b = max(preb, b / 2);
      preb = max(b, cur - b);
      y++;
      if (abs(x - y) <= 1) return true;
    }
  }
  return false;
}
bool check2(string s) {
  if (s.size() != n) return false;
  int cnt = 0;
  for (int i = 0; i < s.size(); i++) {
    if (!i || s[i] != s[i - 1])
      cnt = 1;
    else
      cnt++;
    if (cnt > k) return false;
  }
  return true;
}
int main() {
  cin >> n >> k >> a >> b;
  int timeg, timeb;
  if (a % k)
    timeg = a / k + 1;
  else
    timeg = a / k;
  if (b % k)
    timeb = b / k + 1;
  else
    timeb = b / k;
  if (!check(timeg, timeb, a, b)) {
    cout << "NO";
    return 0;
  }
  if (timeb > b || timeg > a) {
    cout << "NO";
    return 0;
  }
  int sumg = 0, sumb = 0;
  int shg, shb;
  if (!timeg)
    shg = a;
  else {
    shg = a / timeg;
  }
  if (!timeb)
    shb = b;
  else {
    shb = b / timeb;
  }
  int pre = -1;
  int Timeg = timeg, Timeb = timeb;
  while (timeg || timeb) {
    if (timeg > timeb) {
      if (a % (shg * Timeg)) {
        for (int i = 0; i < shg + 1; i++) s += 'G';
        a--;
      } else
        for (int i = 0; i < shg; i++) s += 'G';
      timeg--;
      pre = 1;
    } else if (timeg < timeb) {
      if (b % (shb * Timeb)) {
        for (int i = 0; i < shb + 1; i++) s += 'B';
        b--;
      } else
        for (int i = 0; i < shb; i++) s += 'B';
      timeb--;
      pre = 2;
    } else {
      if (pre == 1) {
        if (b % (shb * Timeb)) {
          for (int i = 0; i < shb + 1; i++) s += 'B';
          b--;
        } else
          for (int i = 0; i < shb; i++) s += 'B';
        timeb--;
        pre = 2;
      } else {
        if (a % (shg * Timeg)) {
          for (int i = 0; i < shg + 1; i++) s += 'G';
          a--;
        } else
          for (int i = 0; i < shg; i++) s += 'G';
        timeg--;
        pre = 1;
      }
    }
  }
  cout << s;
  return 0;
}
