#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
int dp[maxn][3], n;
int nex[maxn][3];
string str;
map<char, int> mp;
int Dp(int id, int m) {
  if (dp[id][m] != -1) return dp[id][m];
  if (id == n) return 0;
  dp[id][m] = maxn + 10;
  int add;
  if (mp[str[id]] == m)
    add = 0;
  else
    add = 1;
  for (int i = 0; i < 3; i++) {
    if (i == m) continue;
    if (Dp(id + 1, i) < dp[id][m]) {
      dp[id][m] = Dp(id + 1, i) + add;
      nex[id][m] = i;
    }
  }
  return dp[id][m];
}
void out(int s, int num) {
  if (num == n) return;
  if (s == 0)
    cout << "R";
  else if (s == 1)
    cout << "G";
  else
    cout << "B";
  out(nex[num][s], num + 1);
}
int main() {
  int s;
  memset(dp, -1, sizeof(dp));
  mp['R'] = 0;
  mp['G'] = 1;
  mp['B'] = 2;
  cin >> n;
  cin >> str;
  cout << min(min(Dp(0, 0), Dp(0, 1)), Dp(0, 2)) << "\n";
  if (Dp(0, 0) <= Dp(0, 1) && Dp(0, 0) <= Dp(0, 2)) {
    s = 0;
  } else if (Dp(0, 1) <= Dp(0, 0) && Dp(0, 1) <= Dp(0, 2)) {
    s = 1;
  } else
    s = 2;
  out(s, 0);
  return 0;
}
