#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string line;
  cin >> line;
  int number_of_chenges = 0;
  for (int i = 1; i < n; ++i) {
    if (line[i] == line[i - 1]) {
      switch (line[i]) {
        case 'R':
          if (i == n - 1 || line[i + 1] == line[i] || line[i + 1] == 'B') {
            line[i] = 'G';
          } else {
            line[i] = 'B';
          }
          ++number_of_chenges;
          break;
        case 'G':
          if (i == n - 1 || line[i + 1] == line[i] || line[i + 1] == 'B') {
            line[i] = 'R';
          } else {
            line[i] = 'B';
          }
          ++number_of_chenges;
          break;
        case 'B':
          if (i == n - 1 || line[i + 1] == line[i] || line[i + 1] == 'R') {
            line[i] = 'G';
          } else {
            line[i] = 'R';
          }
          ++number_of_chenges;
          break;
      }
    }
  }
  cout << number_of_chenges << '\n' << line << '\n';
  return 0;
}
