#include <bits/stdc++.h>
using namespace std;
int byk[3][3];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'B') byk[i % 3][0]++;
    if (s[i] == 'G') byk[i % 3][1]++;
    if (s[i] == 'R') byk[i % 3][2]++;
  }
  int mini = 10000000;
  vector<int> jwb;
  vector<int> V;
  V.push_back(0);
  V.push_back(1);
  V.push_back(2);
  do {
    int x = byk[0][0] + byk[0][1] + byk[0][2];
    x -= byk[0][V[0]];
    int y = byk[1][0] + byk[1][1] + byk[1][2];
    y -= byk[1][V[1]];
    int z = byk[2][0] + byk[2][1] + byk[2][2];
    z -= byk[2][V[2]];
    if (x + y + z < mini) {
      mini = x + y + z;
      jwb.clear();
      jwb.push_back(V[0]);
      jwb.push_back(V[1]);
      jwb.push_back(V[2]);
    }
  } while (next_permutation(V.begin(), V.end()));
  cout << mini << endl;
  for (int i = 0; i < n; i++) {
    if (i % 3 == 0) {
      if (jwb[0] == 0) cout << 'B';
      if (jwb[0] == 1) cout << 'G';
      if (jwb[0] == 2) cout << 'R';
    }
    if (i % 3 == 1) {
      if (jwb[1] == 0) cout << 'B';
      if (jwb[1] == 1) cout << 'G';
      if (jwb[1] == 2) cout << 'R';
    }
    if (i % 3 == 2) {
      if (jwb[2] == 0) cout << 'B';
      if (jwb[2] == 1) cout << 'G';
      if (jwb[2] == 2) cout << 'R';
    }
  }
  cout << endl;
  return 0;
}
