#include <bits/stdc++.h>
using namespace std;
int n;
string s;
string ss[7];
int minn = 0x3f3f3f3f;
int main() {
  ss[1] = "RGB";
  ss[2] = "RBG";
  ss[3] = "GBR";
  ss[4] = "GRB";
  ss[5] = "BRG";
  ss[6] = "BGR";
  cin >> n;
  cin >> s;
  int tt = 1;
  for (int j = 1; j <= 6; j++) {
    int tmp = 0;
    for (int i = 0; i < s.size(); i++) {
      int t = i % 3;
      if (ss[j][t] != s[i]) tmp++;
    }
    if (tmp < minn) {
      tt = j;
      minn = tmp;
    }
  }
  cout << minn << endl;
  for (int i = 0; i < s.size(); i++) {
    int t = i % 3;
    cout << ss[tt][t];
  }
  cout << endl;
  return 0;
}
