func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int a, b;     cin >> a >> b;     string s;     cin >> s;     while (b--) {       for (int i = 0; i < a - 1; i++) {         if (s[i] ==  B  && s[i + 1] ==  G ) {           int t;           t = s[i];           s[i] = s[i + 1];           s[i + 1] = t;           i++;         }       }     }     cout << s;     return 0;   }   