#include <bits/stdc++.h>
using namespace std;
int n, lamps[200005];
map<int, char> inttochar;
int main() {
  cin >> n;
  char color;
  for (int i = 0; i < n; i++) {
    cin >> color;
    if (color == 'R')
      lamps[i] = 0;
    else if (color == 'G')
      lamps[i] = 1;
    else
      lamps[i] = 2;
  }
  inttochar[0] = 'R';
  inttochar[1] = 'G';
  inttochar[2] = 'B';
  int recolor = 0;
  for (int i = 1; i < n - 1; i++) {
    if (lamps[i] == lamps[i - 1]) {
      recolor++;
      if (lamps[i] != lamps[i + 1]) {
        int sum = lamps[i - 1] + lamps[i + 1];
        if (sum == 1)
          lamps[i] = 2;
        else if (sum == 2)
          lamps[i] = 1;
        else
          lamps[i] = 0;
      } else {
        lamps[i] = (lamps[i - 1] + 1) % 3;
      }
    }
  }
  if (lamps[n - 1] == lamps[n - 2]) {
    recolor++;
    int sum = lamps[n - 3] + lamps[n - 1];
    if (sum == 1)
      lamps[n - 2] = 2;
    else if (sum == 2)
      lamps[n - 2] = 1;
    else
      lamps[n - 2] = 0;
  }
  cout << recolor << "\n";
  for (int i = 0; i < n; i++) {
    cout << inttochar[lamps[i]];
  }
  return 0;
}
