#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  string t = "BGR";
  string s;
  int n;
  cin >> n >> s;
  unsigned long long mn = 100000000000000000;
  string sm;
  do {
    char c1 = t[0], c2 = t[1], c3 = t[2];
    unsigned long long cnt = 0;
    string ss;
    for (int i = 0; i < n; i++) {
      if (i % 3 == 0) {
        if (s[i] != c1) {
          cnt++;
        }
        ss.push_back(c1);
      } else if (i % 3 == 1) {
        if (s[i] != c2) {
          cnt++;
        }
        ss.push_back(c2);
      }
      if (i % 3 == 2) {
        if (s[i] != c3) {
          cnt++;
        }
        ss.push_back(c3);
      }
    }
    if (mn > cnt) {
      mn = cnt;
      sm = ss;
    }
  } while (next_permutation(t.begin(), t.end()));
  cout << mn << endl;
  cout << sm << endl;
  return 0;
}
