#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n;
  cin >> s;
  string arr[] = {"BRG", "BGR", "RGB", "RBG", "GBR", "GRB"};
  int min = n;
  int minc = 0;
  for (int i = 0; i < 6; i++) {
    int r = 0;
    for (int j = 0; j < n; j++) {
      if (arr[i][j % 3] != s[j]) r++;
    }
    if (r < min) {
      min = r;
      minc = i;
    }
  }
  cout << min << "\n";
  for (int i = 0; i < n; i++) {
    cout << arr[minc][i % 3];
  }
}
