#include <bits/stdc++.h>
using namespace std;
long long n, res, cnt;
string s, a = "RGB";
int main() {
  cin >> n >> s;
  for (int i = 1; i < n; i++) {
    if (s[i] == s[i - 1]) {
      res++;
      for (int j = 0; j < 3; j++) {
        if (a[j] != s[i - 1]) {
          if (i + 1 < n && a[j] == s[i + 1]) continue;
          s[i] = a[j];
          break;
        }
      }
    }
  }
  cout << res << "\n" << s << endl;
  return 0;
}
