#include <bits/stdc++.h>
using namespace std;
const int R = 0;
const int G = 1;
const int B = 2;
int cnt[3][3];
int choices[3];
int main() {
  ios::sync_with_stdio(false);
  for (int pos = 0; pos < 3; pos++) {
    for (int type = 0; type < 3; type++) {
      cnt[pos][type] = 0;
    }
  }
  int N;
  cin >> N;
  vector<int> lamps(N);
  char ch;
  for (int i = 0; i < N; i++) {
    cin >> ch;
    int l;
    if (ch == 'R') {
      l = R;
    } else {
      l = (ch == 'G') ? G : B;
    }
    lamps[i] = l;
  }
  for (int i = 0; i < N; i++) {
    cnt[i % 3][lamps[i]]++;
  }
  int misplaced_best = N;
  choices[0] = R;
  choices[1] = G;
  choices[2] = B;
  for (int type1 = 0; type1 < 3; type1++) {
    for (int type2 = 0; type2 < 3; type2++) {
      for (int type3 = 0; type3 < 3; type3++) {
        if (type1 == type2 || type2 == type3 || type1 == type3) continue;
        int typechoice[3] = {type1, type2, type3};
        int misplaced = 0;
        for (int pos = 0; pos < 3; pos++) {
          for (int type = 0; type < 3; type++) {
            if (type != typechoice[pos]) {
              misplaced += cnt[pos][type];
            }
          }
        }
        if (misplaced < misplaced_best) {
          misplaced_best = misplaced;
          for (int pos = 0; pos < 3; pos++) {
            choices[pos] = typechoice[pos];
          }
        }
      }
    }
  }
  int changes = 0;
  for (int i = 0; i < N; i++) {
    if (lamps[i] != choices[i % 3]) {
      lamps[i] = choices[i % 3];
      changes++;
    }
  }
  cout << changes << endl;
  for (auto l : lamps) {
    if (l == R) {
      cout << 'R';
    } else {
      cout << (l == G ? 'G' : 'B');
    }
  }
  cout << endl;
  return 0;
}
