#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> p(3);
  iota(p.begin(), p.end(), 0);
  string c = "RGB", res = "";
  int ans = 1e9;
  do {
    string t;
    int count = 0;
    for (int i = 0; i < n; i++) {
      t += c[p[i % 3]];
      if (t[i] != s[i]) count++;
    }
    if (ans > count) {
      ans = count;
      res = t;
    }
  } while (next_permutation(p.begin(), p.end()));
  cout << ans << endl << res << endl;
}
