#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  string s;
  cin >> s;
  string p = "BGR";
  int min = INT_MAX;
  string res;
  do {
    int change = 0;
    int i = 0;
    string temp;
    for (int j = 0; j < t; j++) {
      if (s[j] != p[i]) {
        change++;
        temp.push_back(p[i]);
      } else
        temp.push_back(s[j]);
      i = (i + 1) % 3;
    }
    if (change < min) {
      min = change;
      res = temp;
    }
  } while (next_permutation(p.begin(), p.end()));
  cout << min << endl;
  cout << res << endl;
}
