#include <bits/stdc++.h>
using namespace std;
const int oo = 2e9;
const int N = 1e6;
int n;
string s, x = "BGR";
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> s;
  int k = oo;
  string ans;
  do {
    int cnt = 0;
    string t = s;
    for (int i = 0; i < n; i++)
      if (t[i] != x[i % 3]) {
        cnt++;
        t[i] = x[i % 3];
      }
    if (cnt < k) {
      k = cnt;
      ans = t;
    }
  } while (next_permutation(x.begin(), x.end()));
  cout << k << "\n" << ans;
}
