#include <bits/stdc++.h>
using namespace std;
string kk[6] = {"RGB", "RBG", "BRG", "BGR", "GRB", "GBR"};
int main() {
  int n;
  string ss;
  cin >> n >> ss;
  int s = 0, min = 9999999, k;
  for (int i = 0; i < 6; i++) {
    for (int j = 0; j < n; j++) {
      if (ss[j] != kk[i][j % 3]) s++;
    }
    if (s < min) {
      min = s;
      k = i;
    }
    s = 0;
  }
  cout << min << endl;
  for (int i = 0; i < n; i++) cout << kk[k][i % 3];
  cout << endl;
  return 0;
}
