#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, i, j, pos;
  int b[6];
  char bz[6][4] = {"RGB", "RBG", "GBR", "GRB", "BRG", "BGR"};
  char s[200005];
  scanf("%d", &n);
  getchar();
  gets(s);
  for (i = 0; i < 6; i++) {
    t = 0;
    pos = 0;
    for (j = 0; j < n; j++) {
      if (s[j] != bz[i][pos]) t++;
      pos++;
      if (pos == 3) pos = 0;
    }
    b[i] = t;
  }
  int Min = n;
  for (i = 0; i < 6; i++)
    if (b[i] < Min) {
      Min = b[i];
      t = i;
    }
  printf("%d\n", Min);
  pos = 0;
  while (n--) {
    printf("%c", bz[t][pos]);
    pos++;
    if (pos == 3) pos = 0;
  }
  printf("\n");
  return 0;
}
