#include <bits/stdc++.h>
using namespace std;
const int maxi = 211111;
int n;
string s;
map<char, int> mpp;
map<int, char> rev;
pair<int, string> lol(int a, int b, int c) {
  int cnt = 0;
  string str = "";
  for (int i = 0; i < n; i++) {
    if (i % 3 == 0) {
      if (mpp[s[i]] != a) cnt++;
      str += rev[a];
    } else if (i % 3 == 1) {
      if (mpp[s[i]] != b) cnt++;
      str += rev[b];
    } else {
      if (mpp[s[i]] != c) cnt++;
      str += rev[c];
    }
  }
  return make_pair(cnt, str);
}
int main() {
  mpp['R'] = 1;
  mpp['G'] = 2;
  mpp['B'] = 3;
  rev[1] = 'R';
  rev[2] = 'G';
  rev[3] = 'B';
  cin >> n >> s;
  int cnt = 0;
  vector<pair<int, string> > v;
  v.push_back(lol(1, 2, 3));
  v.push_back(lol(1, 3, 2));
  v.push_back(lol(2, 1, 3));
  v.push_back(lol(2, 3, 1));
  v.push_back(lol(3, 1, 2));
  v.push_back(lol(3, 2, 1));
  sort(v.begin(), v.end());
  cout << v[0].first << endl << v[0].second << endl;
  return 0;
}
