#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  string perm[] = {"GRB", "GBR", "BRG", "BGR", "RBG", "RGB"};
  vector<string> act;
  for (int i = 0; i < 6; i++) {
    string temp = "";
    for (int j = 0; j < n / 3; j++) temp += perm[i];
    temp += perm[i].substr(0, n % 3);
    act.push_back(temp);
  }
  int mn = INT_MAX, ind;
  for (int i = 0; i < 6; i++) {
    int temp = 0;
    for (int j = 0; j < n; j++)
      if (str[j] != act[i][j]) {
        temp++;
      }
    if (mn > temp) {
      mn = temp;
      ind = i;
    }
  }
  cout << mn << endl << act[ind] << endl;
}
