#include <bits/stdc++.h>
using namespace std;
string sa[] = {"RGB", "RBG", "GBR", "GRB", "BRG", "BGR"};
int l, j;
int main() {
  int n, mi = 10000000;
  cin >> n;
  string s, sx;
  cin >> s;
  l = s.size();
  if (l == 1) {
    cout << "0" << endl;
    cout << s << endl;
    return 0;
  } else if (l == 2) {
    if (s[0] == s[1]) {
      if (s[0] == 'R') {
        s[1] = 'B';
        cout << "1" << endl;
        cout << s << endl;
      } else if (s[0] == 'B') {
        s[1] = 'R';
        cout << "1" << endl;
        cout << s << endl;
      } else if (s[0] == 'G') {
        s[1] = 'B';
        cout << "1" << endl;
        cout << s << endl;
      }
    } else {
      cout << "0" << endl;
      cout << s << endl;
    }
    return 0;
  }
  for (int i = 0; i < 6; i++) {
    string sk = sa[i];
    string sd = sk;
    while (l - sd.size() >= 3) sd += sk;
    int jj = l - sd.size();
    for (int ii = 0; ii < jj; ii++) sd += sk[ii];
    int k = 0;
    for (int j = 0; j < (int)s.size(); j++)
      if (s[j] != sd[j]) k++;
    if (k < mi) {
      sx = sd;
      mi = k;
    }
  }
  cout << mi << endl;
  cout << sx << endl;
}
