#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, count = 0, mn = INT_MAX;
  string st = "BGR";
  cin >> n;
  string s, t;
  cin >> s;
  t = s;
  do {
    for (long long i = 0; i < n; i++) {
      if (st[i % 3] != s[i]) count++;
    }
    if (mn > count) {
      mn = count;
      for (long long i = 0; i < n; i++) {
        t[i] = st[i % 3];
      }
    }
    count = 0;
  } while (next_permutation((st).begin(), (st).end()));
  cout << mn << '\n';
  cout << t;
}
