#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= c == '-';
  for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + (c ^ 48);
  x = f ? -x : x;
}
int n, x, len, res, minn = 0x7fffffff;
char s[400001];
string ans, c[6] = {"RGB", "RBG", "BRG", "BGR", "GRB", "GBR"};
int main() {
  read(n);
  scanf("%s", s), len = strlen(s);
  for (int i = 0; i < 6; i++) {
    res = 0, x = 0;
    for (int j = 0; j < len; j++) {
      if (s[j] != c[i][x++]) res++;
      if (x == 3) x = 0;
    }
    if (res < minn) {
      minn = res;
      ans = c[i];
    }
  }
  x = 0;
  cout << minn << '\n';
  for (int j = 0; j < len; j++) {
    putchar(ans[x++]);
    if (x == 3) x = 0;
  }
  putchar('\n');
  return 0;
}
