#include <bits/stdc++.h>
using namespace std;
bool rev(long long x, long long y) { return x > y; }
void input_arr(long long a[], long long n) {
  for (long long i = 0; i < n; i += 1) cin >> a[i];
}
void print_vec(vector<long long> &v) {
  for (auto i : v) cout << i << " ";
  cout << endl;
}
void print_arr(long long a[], long long n) {
  for (long long i = 0; i < n; i += 1) cout << a[i] << " ";
  cout << endl;
}
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return a.second < b.second;
}
bool sortinrev(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.first > b.first);
}
bool sortinrevbysec(const pair<long long, long long> &a,
                    const pair<long long, long long> &b) {
  return (a.second > b.second);
}
template <typename... T>
void input(T &...args) {
  ((cin >> args), ...);
}
template <typename... T>
void print(T &&...args) {
  ((cout << args << endl), ...);
}
template <typename... T>
void deb(T &&...args) {
  cout << "~~ ";
  ((cout << args << " "), ...);
  cout << endl;
}
void stand8th() {
  long long n, k, a, b;
  input(n, k, a, b);
  if (a == b) {
    long long f = 1;
    ;
    for (long long i = 0; i < n; i += 1) {
      if (f)
        cout << "B";
      else
        cout << "G";
      f ^= 1;
    }
  } else {
    char c1 = 'G';
    char c2 = 'B';
    if (b > a) {
      swap(a, b);
      swap(c1, c2);
    }
    long long ta = a, tb = b;
    string ans;
    long long cnt = 0;
    while (a != b) {
      cnt++;
      if (cnt > 10000) break;
      long long x = ceil((a - b) / (float)k);
      if (x == 0) break;
      for (long long i = 0; i < x; i += 1) {
        for (long long j = 0; j < k; j += 1) {
          if (a > 0) {
            ans += c1;
            a--;
          }
        }
        if (b > 0) {
          ans += c2;
          b--;
        }
      }
    }
    while (a + b > 0) {
      if (a > 0) {
        ans += c1;
        a--;
      }
      if (b > 0) {
        ans += c2;
        b--;
      }
    }
    long long a1 = 0;
    long long b1 = 0;
    for (long long i = 0; i < n; i += 1) {
      if (ans[i] == c1)
        a1++;
      else if (ans[i] == c2)
        b1++;
    }
    if (a1 != ta || b1 != tb) {
      print("NO");
      return;
    }
    vector<long long> v;
    long long val = 1;
    for (long long i = 1; i < ans.size(); i += 1) {
      if (ans[i] == ans[i - 1]) {
        val++;
      } else {
        v.push_back(val);
        val = 1;
      }
    }
    v.push_back(val);
    for (auto vbn : v) {
      if (vbn > k) {
        print("NO");
        return;
      }
    }
    print(ans);
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long tin = 1;
  while (tin--) {
    stand8th();
  }
  return 0;
}
