#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans = 0;
  int start = 0;
  int end = 1;
  while (end <= n) {
    if (end != n && s[end] == s[start]) {
      end++;
      continue;
    }
    ans += (end - start) / 2;
    start = end;
    end++;
  }
  for (int i = 1; i < n; i++) {
    if (s[i] == s[i - 1]) {
      if (i == n - 1) {
        if (s[i - 1] == 'G')
          s[i] = 'R';
        else
          s[i] = 'G';
        continue;
      }
      if (s[i - 1] == 'G') {
        if (s[i + 1] == 'R') {
          s[i] = 'B';
        } else {
          s[i] = 'R';
        }
      } else if (s[i - 1] == 'R') {
        if (s[i + 1] == 'G') {
          s[i] = 'B';
        } else {
          s[i] = 'G';
        }
      } else {
        if (s[i + 1] == 'R') {
          s[i] = 'G';
        } else {
          s[i] = 'R';
        }
      }
    }
  }
  cout << ans << endl;
  cout << s << endl;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
