#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string str, str1, s;
  cin >> str;
  str1 = "BGR";
  int ans = 10000000;
  do {
    int count = 0;
    for (int i = 0; i < n; i++) {
      if (str[i] != str1[i % 3]) count++;
    }
    if (count < ans) {
      ans = count;
      s = str1;
    }
  } while (next_permutation(str1.begin(), str1.end()));
  cout << ans << endl;
  for (int i = 0; i < n; i++) cout << s[i % 3];
  cout << endl;
  return 0;
}
