func_code_string: #include <bits/stdc++.h>   using namespace std;   void c_p_c() {}   int main(int argc, char const *argv[]) {     c_p_c();     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     ;     int n;     string arr;     cin >> n >> arr;     int cnt = 0;     if (n == 1) {       cout << cnt << endl;       cout << arr << endl;       return 0;     }     for (int i = 1; i < n; i++) {       if (arr[i] == arr[i - 1] && arr[i] == arr[i + 1]) {         cnt++;         if (arr[i] ==  R )           arr[i] =  G ;         else if (arr[i] ==  G )           arr[i] =  R ;         else {           arr[i] =  G ;         }         i++;       } else if (arr[i] == arr[i - 1]) {         cnt++;         if (arr[i] ==  R  && arr[i + 1] ==  B ) {           arr[i] =  G ;           i++;         } else if (arr[i] ==  R  && arr[i + 1] ==  G ) {           arr[i] =  B ;           i++;         } else if (arr[i] ==  G  && arr[i + 1] ==  R ) {           arr[i] =  B ;           i++;         } else if (arr[i] ==  G  && arr[i + 1] ==  B ) {           arr[i] =  R ;           i++;         } else if (arr[i] ==  B  && arr[i + 1] ==  G ) {           arr[i] =  R ;           i++;         } else if (arr[i] ==  B  && arr[i + 1] ==  R ) {           arr[i] =  G ;           i++;         } else {           if (arr[i - 1] ==  R )             arr[i] =  G ;           else if (arr[i - 1] ==  G )             arr[i] =  R ;           else             arr[i] =  R ;         }       }     }     cout << cnt << endl;     cout << arr << endl;   }   