#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = 1000000000009;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n{};
  cin >> n;
  string s;
  cin >> s;
  long long cnt = inf;
  int pos{};
  string ans[] = {"RGB", "RBG", "GBR", "GRB", "BGR", "BRG"};
  for (int i = 0, sz = (int)6; i < sz; i++) {
    int m{};
    for (int j = 0, sz = (int)n; j < sz; j++) {
      if (s[j] != ans[i][j % 3]) m++;
    }
    if (cnt > m) cnt = m, pos = i;
  }
  cout << cnt << "\n";
  for (int i = 0, sz = (int)n; i < sz; i++) cout << ans[pos][i % 3];
  cout << "\n";
  return 0;
}
