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