#include <bits/stdc++.h>
using namespace std;
inline char f(char a, char b) {
  static vector<char> v{'R', 'G', 'B'};
  return *find_if((v).begin(), (v).end(),
                  [=](char c) { return c != a && c != b; });
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  size_t ans = 0;
  for (int i = 0; i < n - 2; ++i) {
    if (s[i] == s[i + 1] && s[i] == s[i + 2]) {
      ++ans;
      s[i + 1] = f(s[i], s[i]);
    }
  }
  for (int i = 0; i < n - 1; ++i) {
    if (s[i] == s[i + 1]) {
      ++ans;
      s[i] = f(s[i + 1], (i > 0 ? s[i - 1] : s[i + 1]));
    }
  }
  cout << ans << endl << s << endl;
  return 0;
}
