#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  string s, s1 = "", str;
  cin >> s;
  long long maxi = INT_MAX, ans = 0;
  string t[6] = {"BRG", "GRB", "BGR", "GBR", "RGB", "RBG"};
  for (long long i = 0; i < 6; i++) {
    for (long long j = 0; j < n; j++) {
      if (t[i][j % 3] != s[j]) ans++;
      s1.push_back(t[i][j % 3]);
    }
    if (ans < maxi) {
      maxi = ans;
      str = s1;
    }
    s1 = "";
    ans = 0;
  }
  cout << maxi << endl;
  cout << str;
  return 0;
}
