#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, i, j;
  cin >> n;
  string s;
  cin >> s;
  vector<pair<char, long long int> > val;
  for (i = 0; i < (n); i++) {
    long long int cnt = 1;
    while (i + 1 < n && s[i] == s[i + 1]) {
      i++;
      cnt++;
    }
    val.push_back(make_pair(s[i], cnt));
  }
  string ans;
  for (i = 0; i < val.size(); i++) {
    long long int cnt = val[i].second;
    char c = val[i].first;
    if (cnt == 1) {
      ans += c;
    } else if (cnt % 2 == 0) {
      char c1;
      if (i + 1 == val.size()) {
        if (c == 'R')
          c1 = 'G';
        else
          c1 = 'R';
      } else {
        c1 = 'R';
        c1 ^= 'G';
        c1 ^= 'B';
        c1 ^= c;
        c1 ^= val[i + 1].first;
      }
      for (j = 0; j < cnt; j++) {
        if (j % 2 == 0)
          ans += c;
        else
          ans += c1;
      }
    } else if (cnt % 2 == 1) {
      char c1;
      if (c == 'R')
        c1 = 'G';
      else
        c1 = 'R';
      for (j = 0; j < cnt; j++) {
        if (j % 2 == 0)
          ans += c;
        else
          ans += c1;
      }
    }
  }
  long long int diff = 0;
  for (i = 0; i < (n); i++)
    if (s[i] != ans[i]) diff++;
  cout << diff << "\n";
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
