#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int mini = 1000000;
  vector<char> jwb;
  vector<char> V;
  V.push_back('B');
  V.push_back('G');
  V.push_back('R');
  do {
    int move = 0;
    string awal = "";
    for (int i = 0; i < n; i++) {
      if (V[i % 3] != s[i]) move++;
    }
    if (move < mini) {
      mini = move;
      jwb.clear();
      jwb.push_back(V[0]);
      jwb.push_back(V[1]);
      jwb.push_back(V[2]);
    }
  } while (next_permutation(V.begin(), V.end()));
  cout << mini << endl;
  for (int i = 0; i < n; i++) {
    cout << jwb[i % 3];
  }
  cout << endl;
  return 0;
}
