#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> p(3);
  p[0] = 0;
  p[1] = 1;
  p[2] = 2;
  long long ans = 1e9, cnt = 0;
  string tmp, c = "GBR", ans1;
  do {
    tmp = "";
    cnt = 0;
    for (int i = 0; i < n; i++) {
      tmp += c[p[i % 3]];
      if (tmp[i] != s[i]) cnt++;
    }
    if (cnt < ans) {
      ans = cnt;
      ans1 = tmp;
    }
  } while (next_permutation(p.begin(), p.end()));
  cout << ans << endl << ans1;
}
