#include <bits/stdc++.h>
using namespace std;
using ll = long long;
char chk(char a, char b, char c) {
  if (a != 'R' && b != 'R' && c != 'R')
    return 'R';
  else if (a != 'G' && b != 'G' && c != 'G')
    return 'G';
  else
    return 'B';
}
void solve() {
  ll n, m = 1000000, j, I;
  string second, P[6] = {"RGB", "RBG", "BGR", "BRG", "GRB", "GBR"};
  cin >> n >> second;
  for (ll i = 0; i < 6; i++) {
    ll cnt = 0;
    for (j = 0; j < n; j++) {
      if (P[i][j % 3] != second[j]) {
        cnt++;
      }
    }
    if (cnt < m) {
      m = cnt;
      I = i;
    }
  }
  cout << m << "\n";
  for (ll i = 0; i < n; i++) {
    cout << P[I][i % 3];
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
