#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  long long int mincnt = INT_MAX;
  long long int t = 0;
  vector<string> s1 = {"RGB", "RBG", "GRB", "GBR", "BRG", "BGR"};
  for (int j = 0; j < 6; j++) {
    long long int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] != s1[j][i % 3]) cnt++;
    }
    if (cnt < mincnt) {
      mincnt = cnt;
      t = j;
    }
  }
  cout << mincnt << endl;
  for (int i = 0; i < n; i++) {
    cout << s1[t][i % 3];
  }
  cout << endl;
}
