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