#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323846;
void rw() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  map<string, long long> r;
  string s, t;
  long long n, d, c = INT_MAX;
  cin >> n >> s;
  r["RGB"];
  r["RBG"];
  r["GRB"];
  r["GBR"];
  r["BRG"];
  r["BGR"];
  for (auto j : r) {
    t = j.first;
    for (int i = 0; i < n - (n % 3 ? n % 3 : 0) - 2; i += 3) {
      if (t[0] != s[i]) r[t]++;
      if (t[1] != s[i + 1]) r[t]++;
      if (t[2] != s[i + 2]) r[t]++;
    }
  }
  d = n / 3;
  for (auto j : r) {
    t = j.first;
    for (int i = 0; i < n % 3; i++) {
      if (t[i] != s[d * 3 + i]) r[t]++;
    }
  }
  s.clear();
  for (auto i : r) {
    if (i.second <= c) c = min(c, i.second), s = i.first;
  }
  cout << c << "\n";
  for (int i = 0; i < n / 3; i++) cout << s;
  for (int i = 0; i < n % 3; i++) cout << s[i];
  return 0;
}
