#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cnt = n;
  string t[6] = {"RGB", "RBG", "BRG", "BGR", "GBR", "GRB"};
  string ans = s;
  for (int i = 0; i < 6; ++i) {
    int c = 0;
    string p = s;
    for (int j = 0; j < n; ++j) {
      if (p[j] != t[i][j % 3]) {
        c++;
        p[j] = t[i][j % 3];
      }
    }
    if (c < cnt) {
      cnt = c;
      ans = p;
    }
  }
  cout << cnt << "\n" << ans << "\n";
  return 0;
}
