#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)2e5 + 5;
const int mod = (int)1e9 + 7;
int n, m, k, l, t, r, ans, T;
int a[maxn];
char s[maxn];
vector<int> op;
char cal(int x, int y) {
  char p[] = {"RGB"};
  for (int i = 0; i < 3; i++)
    if (p[i] != x && p[i] != y) return p[i];
}
int main() {
  cin >> n;
  cin >> s + 1;
  s[n + 1] = '%';
  n++;
  for (int i = 1; i <= n; i++)
    if (s[i] != s[i - 1])
      a[i] = i, op.push_back(i);
    else
      a[i] = a[i - 1];
  for (int i = 1; i <= n; i++)
    if (s[i] != s[i - 1]) ans += (i - 1 - a[i - 1] + 1) / 2;
  a[1] = 1;
  int l = op.size();
  for (int r = 0; r < l; r++) {
    int i = op[r];
    for (int j = a[i - 1] + 1; j < i; j += 2) s[j] = cal(s[j - 1], s[j + 1]);
  }
  s[n] = 0;
  cout << ans << endl << s + 1 << endl;
  return 0;
}
