#include <bits/stdc++.h>
int n;
char data[200010];
char out[200010];
int main() {
  scanf("%d", &n);
  scanf("%s", data);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0 || out[i - 1] != data[i]) {
      out[i] = data[i];
      continue;
    }
    cnt++;
    if (out[i - 1] != 'R' && data[i + 1] != 'R')
      out[i] = 'R';
    else if (out[i - 1] != 'G' && data[i + 1] != 'G')
      out[i] = 'G';
    else
      out[i] = 'B';
  }
  printf("%d\n%s", cnt, out);
  return 0;
}
