func_code_string: #include <bits/stdc++.h>   using namespace std;   const int mod = 998244353;   int gcd(int a, int b) {     if (b == 0) return a;     a %= b;     return gcd(b, a);   }   bool sortbysec(const pair<char, int> &a, const pair<char, int> &b) {     return (a.second < b.second);   }   bool checkParity(long long int a, long long int b) {     if (a % 2 == 0 && b % 2 == 0 || a % 2 == 1 && b % 2 == 1) return true;     return false;   }   bool isPrime(int n) {     if (n <= 1) return false;     for (int i = 2; i < n; i++)       if (n % i == 0) return false;     return true;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     cerr.tie(NULL);     ;     int n;     cin >> n;     string s;     cin >> s;     string p =   ;     for (long long int i = 0; i < s.size(); i++) p += s[i];     int count = 0;     for (long long int i = 0; i < s.size() - 1; i++) {       if (s[i] == s[i + 1]) {         if (s[i] ==  R ) {           if (i + 2 <= s.size() - 1) {             if (s[i + 2] ==  B ) {               count++;               s[i + 1] =  G ;             } else if (s[i + 2] ==  G ) {               count++;               s[i + 1] =  B ;             } else               s[i + 1] =  G ;           } else             s[i + 1] =  G ;         } else if (s[i] ==  G ) {           if (i + 2 <= s.size() - 1) {             if (s[i + 2] ==  B ) {               count++;               s[i + 1] =  R ;             } else if (s[i + 2] ==  R ) {               count++;               s[i + 1] =  B ;             } else               s[i + 1] =  R ;           } else             s[i + 1] =  R ;         } else {           if (i + 2 <= s.size() - 1) {             if (s[i + 2] ==  G ) {               count++;               s[i + 1] =  R ;             } else if (s[i + 2] ==  R ) {               count++;               s[i + 1] =  G ;             } else               s[i + 1] =  R ;           } else             s[i + 1] =  R ;         }       }     }     int l = 0;     for (long long int i = 0; i < n; i++)       if (p[i] != s[i]) l++;     cout << l << endl;     cout << s;   }   