#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int mx = 1e9;
const int v4i[4] = {0, 0, -1, 1};
const int v4j[4] = {-1, 1, 0, 0};
const int v8i[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int v8j[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
int n;
string s, t[6];
int dis(string a, string b) {
  int ans = 0;
  for (int i = 0; i < n; i++)
    if (a[i] != b[i]) ans++;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  for (int i = 0; i <= n / 3; i++) {
    t[0] += "RGB";
    t[1] += "RBG";
    t[2] += "BRG";
    t[3] += "BGR";
    t[4] += "GRB";
    t[5] += "GBR";
  }
  int m = inf, id = -1;
  for (int i = 0; i < 6; i++)
    if (dis(t[i], s) < m) m = dis(t[i], s), id = i;
  cout << m << endl << t[id].substr(0, n);
  return 0;
}
