#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7, MOD = 1e9 + 7;
const long double PI = acos(-1);
int Get(int j, const string& s) {
  int ret = 0;
  for (int i = j; i < s.size() && s[i] == s[j]; ++j) {
    ++ret;
  }
  return ret;
}
char Make(char q, char w) {
  if (q != 'G' && w != 'G') {
    return 'G';
  }
  if (q != 'R' && w != 'R') {
    return 'R';
  }
  if (q != 'B' && w != 'B') {
    return 'B';
  }
  if ((q == 'R' && w == 'B') || (q == 'B' && w == 'R')) {
    return 'G';
  }
  if ((q == 'G' && w == 'B') || (q == 'B' && w == 'G')) {
    return 'R';
  }
  if ((q == 'R' && w == 'G') || (q == 'G' && w == 'R')) {
    return 'B';
  }
}
char MakeOne(char c) {
  if (c == 'R' || c == 'B') {
    return 'G';
  }
  return 'R';
}
int main() {
  int n;
  string s;
  cin >> n >> s;
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    int how_many = Get(i, s);
    if (how_many % 2 == 0) {
      for (int j = i; j < i + how_many; j += 2) {
        if (j == 0) {
          s[j] = MakeOne(s[j + 1]);
          ++cnt;
          continue;
        }
        s[j] = Make(s[j - 1], s[j + 1]);
        ++cnt;
      }
      i += how_many - 1;
    } else {
      for (int j = i + 1; j < i + how_many; j += 2) {
        s[j] = Make(s[j - 1], s[j + 1]);
        ++cnt;
      }
      i += how_many - 1;
    }
  }
  cout << cnt << endl;
  cout << s;
  return 0;
}
