#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string colours;
  cin >> n >> colours;
  string collec[] = {"RGB", "RBG", "BRG", "BGR", "GRB", "GBR"};
  int index;
  int max = INT_MAX;
  for (int i = 0; i < 6; i++) {
    int count = 0;
    for (int j = 0; j < n; j++) {
      if (colours[j] != collec[i][j % 3]) count++;
    }
    if (count < max) {
      max = count;
      index = i;
    }
  }
  cout << max << endl;
  for (int i = 0; i < n; i++) cout << collec[index][i % 3];
}
