func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, k, a, b;     cin >> n >> k >> a >> b;     bool impossible = false;     string s;     int curGroup = (a > b) ? 0 : 1;     int groupSize = 0;     for (int i = 0; i < n; ++i) {       if (curGroup) {         if (!b--) {           impossible = true;           break;         }         s.push_back( B );       } else {         if (!a--) {           impossible = true;           break;         }         s.push_back( G );       }       if (++groupSize == k || ((curGroup && a > b) || (!curGroup && b > a))) {         curGroup = 1 - curGroup;         groupSize = 0;       }     }     cout << (impossible ?  NO  : s) << endl;     return 0;   }   