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