#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  int N, ans = 0x3f3f3f3f, pos = -1;
  string S, Perm[6] = {"RGB", "RBG", "GRB", "GBR", "BRG", "BGR"};
  cin >> N;
  cin >> S;
  for (int i = 0; i < 6; i++) {
    int cnt = 0;
    for (int j = 0; j < N; j++) {
      if (S[j] != Perm[i][j % 3]) cnt++;
    }
    if (ans > cnt) {
      ans = cnt;
      pos = i;
    }
  }
  cout << ans << endl;
  for (int k = 0; k < N; k++) {
    cout << Perm[pos][k % 3];
  }
  cout << '\n';
  return 0;
}
