#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, min = 1e9, mini, t;
  cin >> n;
  char s[n + 1];
  cin >> s;
  char a[6][4] = {"RGB", "RBG", "GBR", "GRB", "BGR", "BRG"};
  for (int i = 0; i < 6; i++) {
    t = 0;
    for (int j = 0; j < n; j++) {
      if (s[j] != a[i][j % 3]) {
        t++;
      }
    }
    if (t < min) {
      min = t;
      mini = i;
    }
  }
  cout << min << endl;
  for (int i = 0; i < n; i++) {
    cout << a[mini][i % 3];
  }
  return 0;
}
