#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
void setup() {}
int main() {
  setup();
  long long T = 1;
  while (T--) {
    long long n;
    cin >> n;
    string s;
    cin >> s;
    long long ans = INF;
    map<char, long long> fc;
    map<char, long long> sc;
    map<char, long long> tc;
    for (int i = 0; i < 3; i++) {
      long long cc = 0;
      for (int j = i; j < n; j += 3) {
        cc++;
        if (i == 0) fc[s[j]]++;
        if (i == 1) sc[s[j]]++;
        if (i == 2) tc[s[j]]++;
      }
      if (i == 0) fc['!'] = cc;
      if (i == 1) sc['!'] = cc;
      if (i == 2) tc['!'] = cc;
    }
    vector<char> final;
    vector<char> dd = {'R', 'B', 'G'};
    sort(dd.begin(), dd.end());
    do {
      long long tans = 0;
      tans += fc['!'] - fc[dd[0]];
      tans += sc['!'] - sc[dd[1]];
      tans += tc['!'] - tc[dd[2]];
      if (tans < ans) {
        final = dd;
        ans = tans;
      }
    } while (next_permutation(dd.begin(), dd.end()));
    for (int i = 0; i < n; i++) {
      s[i] = final[i % 3];
    }
    cout << ans << endl;
    cout << s << endl;
  }
}
