func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(nullptr);     cout << setprecision(20);     auto solve = [&]() -> string {       long long int n, k, a, b;       cin >> n >> k >> a >> b;       long long int remG = a;       long long int remB = b;       string ans;       vector<long long int> rem({remG, remB});       vector<long long int> lab({ G ,  B });       long long int cur = (remG > remB) ? 0 : 1;       while (true) {         if (rem[cur] == 0) {           return  NO ;         } else if (rem[cur] < rem[1 - cur]) {           ans += lab[cur];           rem[cur] -= 1;         } else {           long long int t = min(rem[cur], k);           for (long long int i = 0; i < t; i++) ans += lab[cur];           rem[cur] -= t;         }         if (rem[0] == 0 && rem[1] == 0) return ans;         cur = 1 - cur;       }     };     cout << solve() << endl;     return 0;   }   