#include <bits/stdc++.h>
using namespace std;
const int NMax = 100003;
int n, k, a, b, ok, AA, BB;
vector<int> v;
int ans[NMax];
int valid(int ans[]) {
  int A = 0, B = 0;
  int cont = -1;
  int nr = 0;
  for (int i = 1; i <= n; ++i) {
    if (ans[i] == cont) {
      nr++;
    } else {
      nr = 1;
    }
    cont = ans[i];
    if (nr > k) {
      return 0;
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (ans[i] == 0) {
      A++;
    } else {
      B++;
    }
  }
  if (A > B) {
    swap(A, B);
  }
  if (A != AA || B != BB) {
    return 0;
  }
  return 1;
}
void afisare(int ans[]) {
  if (ok == 0) {
    for (int i = 1; i <= n; ++i) {
      if (ans[i] == 1) {
        cout << 'G';
      } else {
        cout << 'B';
      }
    }
  } else {
    for (int i = 1; i <= n; ++i) {
      if (ans[i] == 1) {
        cout << 'B';
      } else {
        cout << 'G';
      }
    }
  }
}
int main() {
  cin >> n >> k >> a >> b;
  if (a > b) {
    ok = 1;
    swap(a, b);
  }
  AA = a;
  BB = b;
  v.push_back(0);
  if (valid(ans)) {
    afisare(ans);
    return 0;
  }
  for (int i = k + 1; i <= n; i += (k + 1)) {
    ans[i] = 1;
    a--;
    if (a <= 0) {
      if (valid(ans)) {
        afisare(ans);
        return 0;
      }
    }
    v.push_back(i);
  }
  v.push_back(n + 2);
  int curr = 0;
  for (int i = 0; i < v.size() - 1; ++i) {
    for (int j = v[curr] + 1; j < v[curr + 1] - 1; ++j) {
      ans[j] = 1;
      a--;
      if (a <= 0) {
        if (valid(ans)) {
          afisare(ans);
          return 0;
        }
      }
    }
    curr++;
  }
  cout << "NO" << '\n';
  return 0;
}
