#include <bits/stdc++.h>
using namespace std;
int main() {
  int NNN;
  char Color[200005] = {};
  cin >> NNN;
  cin >> Color;
  int grb = 0;
  for (int i = 0; i < NNN; i = i + 3) {
    if (Color[i] == 'G') {
      grb++;
    }
  }
  for (int i = 1; i < NNN; i = i + 3) {
    if (Color[i] == 'R') {
      grb++;
    }
  }
  for (int i = 2; i < NNN; i = i + 3) {
    if (Color[i] == 'B') {
      grb++;
    }
  }
  int gbr = 0;
  for (int i = 0; i < NNN; i = i + 3) {
    if (Color[i] == 'G') {
      gbr++;
    }
  }
  for (int i = 1; i < NNN; i = i + 3) {
    if (Color[i] == 'B') {
      gbr++;
    }
  }
  for (int i = 2; i < NNN; i = i + 3) {
    if (Color[i] == 'R') {
      gbr++;
    }
  }
  int brg = 0;
  for (int i = 0; i < NNN; i = i + 3) {
    if (Color[i] == 'B') {
      brg++;
    }
  }
  for (int i = 1; i < NNN; i = i + 3) {
    if (Color[i] == 'R') {
      brg++;
    }
  }
  for (int i = 2; i < NNN; i = i + 3) {
    if (Color[i] == 'G') {
      brg++;
    }
  }
  int bgr = 0;
  for (int i = 0; i < NNN; i = i + 3) {
    if (Color[i] == 'B') {
      bgr++;
    }
  }
  for (int i = 1; i < NNN; i = i + 3) {
    if (Color[i] == 'G') {
      bgr++;
    }
  }
  for (int i = 2; i < NNN; i = i + 3) {
    if (Color[i] == 'R') {
      bgr++;
    }
  }
  int rbg = 0;
  for (int i = 0; i < NNN; i = i + 3) {
    if (Color[i] == 'R') {
      rbg++;
    }
  }
  for (int i = 1; i < NNN; i = i + 3) {
    if (Color[i] == 'B') {
      rbg++;
    }
  }
  for (int i = 2; i < NNN; i = i + 3) {
    if (Color[i] == 'G') {
      rbg++;
    }
  }
  int rgb = 0;
  for (int i = 0; i < NNN; i = i + 3) {
    if (Color[i] == 'R') {
      rgb++;
    }
  }
  for (int i = 1; i < NNN; i = i + 3) {
    if (Color[i] == 'G') {
      rgb++;
    }
  }
  for (int i = 2; i < NNN; i = i + 3) {
    if (Color[i] == 'B') {
      rgb++;
    }
  }
  map<string, int> mapColor;
  map<string, int>::iterator it;
  string GRB = "GRB", GBR = "GBR", BRG = "BRG", BGR = "BGR", RBG = "RBG",
         RGB = "RGB";
  mapColor[GRB] = grb;
  mapColor[GBR] = gbr;
  mapColor[BRG] = brg;
  mapColor[BGR] = bgr;
  mapColor[RBG] = rbg;
  mapColor[RGB] = rgb;
  int maxvalue = 0;
  string Str;
  for (it = mapColor.begin(); it != mapColor.end(); it++) {
    if (maxvalue < it->second) {
      maxvalue = it->second;
      Str = it->first;
    }
  }
  int runtime = (int)NNN / 3.0;
  int k = 0;
  for (int i = 0; i <= runtime; i++) {
    for (int j = 0; j < 3; j++) {
      Color[k] = Str[j];
      k++;
    }
  }
  cout << NNN - maxvalue << endl;
  for (int i = 0; i < NNN; i++) {
    cout << Color[i];
  }
  return 0;
}
