#include <bits/stdc++.h>
using namespace std;
int main() {
  string rgb = "RGB";
  sort(rgb.begin(), rgb.end());
  string original;
  int n;
  cin >> n;
  cin >> original;
  int best = 2e5 + 10;
  string answer;
  do {
    string current = original;
    int x = 0, y = 0;
    int sum = 0;
    while (y < n) {
      if (current[y] != rgb[x]) {
        current[y] = rgb[x];
        ++sum;
      }
      ++y;
      x = (x + 1) % 3;
    }
    if (sum < best) {
      answer = current;
      best = sum;
    }
  } while (next_permutation(rgb.begin(), rgb.end()));
  cout << best << endl << answer << endl;
  return 0;
}
