#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int a[n];
  for (int i = 0; i < n; i++) a[i] = 1;
  char pre = s[0];
  for (int i = 1; i < n; i++) {
    if (s[i] == pre) a[i] = a[i - 1] + a[i];
    pre = s[i];
  }
  map<char, int> m;
  m['R'] = 0;
  m['G'] = 1;
  m['B'] = 2;
  vector<char> v;
  v.push_back('R');
  v.push_back('G');
  v.push_back('B');
  char fill;
  int x = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] > 1) {
      int j;
      if (a[i] % 2 == 0)
        j = 0;
      else
        j = 1;
      if (i == n - 1)
        fill = v[(m[s[i]] + 1) % 3];
      else
        fill = v[(3 - (m[s[i - 1]] + m[s[i + 1]]))];
      while (j < a[i]) {
        x++;
        s[i - j] = fill;
        j += 2;
      }
      j--;
      i = i - j;
    }
  }
  cout << x << endl;
  cout << s << endl;
}
