#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
char s[N];
int n;
string cur = "RGB";
int main() {
  scanf("%d", &n);
  scanf("%s", s);
  sort(cur.begin(), cur.end());
  string res;
  int all = 1000000000, a = 0;
  do {
    a = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] != cur[i % 3]) a++;
    }
    if (a < all) {
      all = a;
      res = cur;
    }
  } while (next_permutation(cur.begin(), cur.end()));
  for (int i = 0; i < n; i++) s[i] = res[i % 3];
  cout << all << endl;
  puts(s);
  return 0;
}
