#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int n;
char s[maxn];
int main() {
  scanf("%d", &n);
  scanf("%s", s + 1);
  if (n == 1) printf("0\n%s\n", s + 1);
  if (n == 2) {
    if (s[1] != s[2])
      printf("0\n%s\n", s + 1);
    else {
      s[1] = 'R';
      if (s[1] == s[2]) s[1] = 'B';
      printf("1\n%s\n", s + 1);
    }
  }
  if (n == 3) {
    printf("1\nGRB\n");
  }
  if (n > 3) {
    int cnt = 0;
    char aa[6][5] = {"RGB\0", "RBG\0", "GBR\0", "GRB\0", "BRG\0", "BGR\0"};
    int min_ans = maxn;
    int j_ans;
    for (int j = 0; j <= 5; j++) {
      for (int i = 1; i <= n; i += 3) {
        char ss[5];
        ss[1] = s[i], ss[2] = s[i + 1], ss[3] = s[i + 2], ss[4] = '\0';
        if (strcmp(ss + 1, aa[j]) == 0) continue;
        if (ss[2] == '\0') {
          if (ss[1] != aa[j][0]) cnt++;
          continue;
        } else if (ss[3] == '\0') {
          if (ss[1] != aa[j][0]) cnt++;
          if (ss[2] != aa[j][1]) cnt++;
          continue;
        }
        if (ss[1] != aa[j][0]) cnt++;
        if (ss[2] != aa[j][1]) cnt++;
        if (ss[3] != aa[j][2]) cnt++;
      }
      if (cnt < min_ans) min_ans = cnt, j_ans = j;
      cnt = 0;
    }
    printf("%d\n", min_ans);
    int pos = n % 3;
    int mm = (n - pos) / 3;
    for (int i = 1; i <= mm; i++) {
      printf("%s", aa[j_ans]);
    }
    for (int i = 0; i <= pos - 1; i++) {
      printf("%c", aa[j_ans][i]);
    }
    printf("\n");
  }
  return 0;
}
