#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LLINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1000000007;
const double EPS = 1e-8;
const long double EULER = 2.71828182845904523536;
const long double PI = 3.14159265358979323846;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  while (cin >> n) {
    string s;
    cin >> s;
    if (n >= 2)
      s += s[n - 2];
    else {
      cout << 0 << endl << s << endl;
      continue;
    }
    int ans = 0;
    for (int i = 0; i < n - 1; i++) {
      if (s[i] != s[i + 1]) continue;
      ans++;
      int r, g, b;
      r = g = b = 0;
      for (int j = 0; j < 3; j++) {
        if (s[i + j] == 'R')
          r++;
        else if (s[i + j] == 'G')
          g++;
        else if (s[i + j] == 'B')
          b++;
      }
      if (!r)
        s[i + 1] = 'R';
      else if (!g)
        s[i + 1] = 'G';
      else if (!b)
        s[i + 1] = 'B';
    }
    cout << ans << endl;
    cout << s.substr(0, n) << endl;
  }
  return 0;
}
