#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  string str;
  cin >> str;
  string s[6] = {"RGB", "RBG", "GRB", "GBR", "BGR", "BRG"};
  int ans[6] = {0, 0, 0, 0, 0, 0};
  string ansStr[6];
  for (int i = 0; i < 6; i++) {
    for (int j = 0; j < str.size(); j++) {
      char c = str[j];
      if (c != s[i][j % 3]) {
        c = s[i][j % 3];
        ans[i]++;
      }
      ansStr[i] += c;
    }
  }
  int idx = 0;
  int minValue = ans[0];
  for (int i = 0; i < 6; i++) {
    if (minValue > ans[i]) {
      idx = i;
      minValue = ans[i];
    }
  }
  cout << minValue << endl;
  cout << ansStr[idx] << endl;
  return 0;
}
