#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int ans = 0, i, v = 1, n, j;
  cin >> n;
  string s;
  vector<long long int> p;
  p.push_back('G');
  p.push_back('R');
  p.push_back('B');
  cin >> s;
  for (i = 0; i < n - 1; ++i) {
    if (i < (n - 1) && s[i] == s[i + 1])
      v++;
    else {
      ans += (v / 2);
      v = 1;
    }
  }
  ans += (v / 2);
  for (i = 0; i < n - 1; ++i) {
    if (s[i] == s[i + 1]) {
      if ((i + 2) < n) {
        for (j = 0; j < 3; ++j) {
          if (p[j] != s[i] && p[j] != s[i + 2]) s[i + 1] = p[j];
        }
      } else {
        for (j = 0; j < 3; ++j) {
          if (p[j] != s[i]) s[i + 1] = p[j];
        }
      }
    }
  }
  cout << ans << '\n';
  cout << s;
}
