#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, pb = 0;
  cin >> n;
  string str;
  cin >> str;
  int a[n];
  for (int i = 0; i < n; i++) {
    if (str[i] == 'R')
      a[i] = 0;
    else if (str[i] == 'G')
      a[i] = 1;
    else
      a[i] = 2;
  }
  for (int i = 0; i < n - 1; i++) {
    if (a[i] == a[i + 1] && i + 2 < n) {
      if (a[i + 2] == a[i])
        a[i + 1] = (a[i] + 1) % 3;
      else if ((a[i] + 1) % 3 == a[i + 2])
        a[i + 1] = (a[i + 1] + 2) % 3;
      else
        a[i + 1] = (a[i + 1] + 1) % 3;
      pb++;
    } else if (a[i] == a[i + 1]) {
      a[i + 1] = (a[i] + 1) % 3;
      pb++;
    }
  }
  cout << pb;
  cout << endl;
  for (int i = 0; i < n; i++) {
    if (a[i] == 0)
      cout << 'R';
    else if (a[i] == 1)
      cout << 'G';
    else
      cout << 'B';
  }
  return 0;
}
