#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e18 + 7;
long long int modval(long long int n) { return n % mod; }
long long int modadd(long long int a, long long int b) {
  return modval(modval(a) + modval(mod + modval(b)));
}
long long int modmul(long long int a, long long int b) {
  return modval(modval(a) * modval(b));
}
long long int fast_expo(long long int base, long long int power,
                        long long int ans) {
  if (power > 0) {
    if (power & 1) ans = modmul(ans, base);
    power >>= 1, base = modmul(base, base);
    return fast_expo(base, power, ans);
  } else
    return ans;
}
void diverse_garland() {
  long long int n, ans = 0;
  scanf("%lld", &n);
  string s;
  cin >> s;
  char a[3];
  a[0] = 'R', a[1] = 'B', a[2] = 'G';
  for (long long int i = 1; i < n; i++) {
    if (s[i] == s[i - 1]) {
      for (long long int j = 0; j < 3; j++) {
        if (s[i - 1] != a[j]) {
          if (i + 1 < n) {
            if (s[i + 1] != a[j]) {
              s[i] = a[j];
              ans++;
              break;
            }
          } else {
            s[i] = a[j];
            ans++;
            break;
          }
        }
      }
    }
  }
  printf("%lld\n", ans);
  cout << s;
}
int32_t main() {
  long long int t = 1;
  while (t--) diverse_garland();
}
