#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int mod = 998244353;
const int N = 2e5 + 5;
int n;
char s[N];
char ss[] = "BGR";
map<char, int> mp;
int main() {
  mp['B'] = 0;
  mp['G'] = 1;
  mp['R'] = 2;
  scanf("%d", &n);
  scanf("%s", s + 1);
  int ans = 0;
  for (int i = 1; i <= n - 1; i++) {
    if (s[i] == s[i + 1] && i < n - 1) {
      if (s[i] == s[i + 2])
        s[i + 1] = ss[(mp[s[i]] + 1) % 3];
      else {
        int k = 0;
        while (k < 3) {
          if (ss[k] != s[i] && ss[k] != s[i + 2]) break;
          k++;
        }
        s[i + 1] = ss[k];
      }
      ans++;
    } else if (i == n - 1 && s[i] == s[i + 1]) {
      s[i + 1] = ss[(mp[s[i]] + 1) % 3];
      ans++;
    }
  }
  printf("%d\n%s\n", ans, s + 1);
  return 0;
}
