#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)1e5 * 3;
string s, bl = "RBG", bll;
int a[3][500], n, mi = 99999999, dp[MAXN][3], bac[MAXN][3];
int getI(char x) {
  for (int i = 0; i < bl.size(); i++) {
    if (bl[i] == x) return i;
  }
}
char getByI(int x) { return bl[x]; }
void rec(int lvl, int color) {
  if (lvl == 0) return;
  rec(lvl - 1, bac[lvl][color]);
  cout << getByI(color);
}
int main() {
  cin >> n >> s;
  for (int i = 0; i < 3; i++) {
    if (getByI(i) != s[0]) {
      dp[1][i]++;
    }
  }
  for (int i = 2; i <= s.size(); i++) {
    for (int j = 0; j < 3; j++) {
      dp[i][j] = MAXN;
    }
  }
  for (int i = 2; i <= s.size(); i++) {
    for (int j = 0; j < 3; j++) {
      for (int l = 0; l < 3; l++) {
        if (j == l) continue;
        bool f = getByI(j) != s[i - 1];
        if (dp[i][j] > dp[i - 1][l] + f) {
          dp[i][j] = dp[i - 1][l] + f;
          bac[i][j] = l;
        }
      }
    }
  }
  int ll = MAXN, kk;
  for (int i = 0; i < 3; i++) {
    if (ll > dp[n][i]) {
      ll = dp[n][i];
      kk = i;
    }
  }
  cout << ll << endl;
  rec(n, kk);
}
