#include <bits/stdc++.h>
using namespace std;
string a[] = {"RBG", "RGB", "BRG", "BGR", "GBR", "GRB"};
int main() {
  long long n;
  string s;
  cin >> n >> s;
  long long cnt = 0, ans = n;
  int pos = 0;
  for (int i = 0; i < 6; i++) {
    cnt = 0;
    for (int j = 0; j < n; j++) {
      if (s[j] != a[i][j % 3]) cnt++;
    }
    if (cnt < ans) {
      ans = cnt;
      pos = i;
    }
  }
  cout << ans << endl;
  for (int i = 0; i < n; i++) {
    cout << a[pos][i % 3];
  }
}
