#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n == 1) {
    cout << 0 << endl;
    cout << s;
    return 0;
  }
  map<string, char> mp;
  mp["RR"] = 'G';
  mp["GG"] = 'B';
  mp["BB"] = 'R';
  mp["RB"] = 'G';
  mp["BR"] = 'G';
  mp["GB"] = 'R';
  mp["BG"] = 'R';
  mp["RG"] = 'B';
  mp["GR"] = 'B';
  mp["R"] = 'G';
  mp["G"] = 'R';
  mp["B"] = 'R';
  int mans = INT_MAX;
  int it = -1;
  int temp = 0;
  for (int i = 0; i < n - 2; i++) {
    if (s[i] == s[i + 1]) {
      temp++;
      string str = "";
      str += s[i];
      str += s[i + 2];
      s[i + 1] = mp[str];
    }
  }
  if (s[n - 1] == s[n - 2]) {
    string str = "";
    str += s[n - 1];
    s[n - 1] = mp[str];
    temp++;
  }
  cout << temp << endl;
  cout << s;
  return 0;
}
