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