#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
int n;
char buf[N];
string cand[6] = {"RGB", "RBG", "GRB", "GBR", "BRG", "BGR"};
string gen(int idx, int len) {
  string ret = "";
  for (int i = 0; i < len; i++) ret += cand[idx][i % 3];
  return ret;
}
int diff(const string& str) {
  int ret = 0;
  for (int i = 0; i < n; i++)
    if (str[i] != buf[i]) ret++;
  return ret;
}
int main() {
  scanf("%d", &n);
  scanf("%s", buf);
  if (n < 3) {
    if (n == 1 || buf[0] != buf[1])
      printf("0\n%s\n", buf);
    else {
      if (buf[0] == 'B') printf("1\nBR\n");
      if (buf[0] == 'R') printf("1\nRG\n");
      if (buf[0] == 'G') printf("1\nGB\n");
    }
    return 0;
  }
  int mn = 0x3f3f3f3f;
  string ans;
  for (int i = 0; i < 6; i++) {
    string str = gen(i, n);
    int tmp = diff(str);
    if (tmp < mn) {
      mn = tmp;
      ans = str;
    }
  }
  printf("%d\n", mn);
  printf("%s\n", ans.c_str());
}
