#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T pow(T a, T b, long long int m) {
  T ans = 1;
  while (b > 0) {
    if (b % 2 == 1) ans = ((ans % m) * (a % m)) % m;
    b /= 2;
    a = ((a % m) * (a % m)) % m;
  }
  return ans % m;
}
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int min = INT_MAX;
  int ii = -1;
  vector<string> second = {"BRG", "BGR", "RGB", "RBG", "GBR", "GRB"};
  for (int i = 0; i < second.size(); i++) {
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (s[j] != second[i][j % 3]) {
        cnt++;
      }
    }
    if (cnt < min) {
      min = cnt;
      ii = i;
    }
  }
  cout << min << '\n';
  for (int i = 0; i < n; i++) {
    cout << second[ii][i % 3];
  }
  return 0;
}
