#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
string s[10];
int n;
char t[MAXN];
int main() {
  s[1] = "RGB";
  s[2] = "RBG";
  s[3] = "GRB";
  s[4] = "GBR";
  s[5] = "BRG";
  s[6] = "BGR";
  while (~scanf("%d%s", &n, t)) {
    int pos = 0, minn = 0x3f3f3f3f;
    for (int j = 1; j <= 6; j++) {
      int num = 0;
      for (int i = 0; i <= n - 1; i++) {
        if (s[j][i % 3] != t[i]) num++;
      }
      if (num < minn) {
        minn = num;
        pos = j;
      }
    }
    printf("%d\n", minn);
    for (int i = 0; i <= n - 1; i++) {
      cout << s[pos][i % 3];
    }
    cout << endl;
  }
  return 0;
}
