#include <bits/stdc++.h>
long long int mod = 1000000007;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  string str[6] = {"BGR", "BRG", "GBR", "GRB", "RBG", "RGB"};
  int mn = INT_MAX;
  int idx;
  for (int i = 0; i < 6; i++) {
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (s[j] != str[i][j % 3]) cnt++;
    }
    if (cnt < mn) {
      mn = cnt;
      idx = i;
    }
  }
  cout << mn << endl;
  for (int i = 0; i < n; i++) cout << str[idx][i % 3];
  return 0;
}
