#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  long long int g[3];
  g[0] = g[1] = g[2] = 0;
  long long int b[3];
  b[0] = b[1] = b[2] = 0;
  long long int r[3];
  r[0] = r[1] = r[2] = 0;
  for (int i = 0; i < s.length(); i++) {
    for (int k = 0; k < 3; k++) {
      if (i % 3 == k && s[i] == 'G') g[k]++;
      if (i % 3 == k && s[i] == 'B') b[k]++;
      if (i % 3 == k && s[i] == 'R') r[k]++;
    }
  }
  long long int sum = INT_MAX;
  string ans = "GBR";
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      if (j == i) continue;
      for (int k = 0; k < 3; k++) {
        if (k == i || k == j) continue;
        if (sum > (n - g[i] - b[j] - r[k])) {
          sum = n - g[i] - b[j] - r[k];
          ans[i] = 'G';
          ans[j] = 'B';
          ans[k] = 'R';
        }
      }
    }
  }
  cout << sum << endl;
  for (int i = 0; i < n; i++) {
    cout << ans[i % 3];
  }
  return 0;
}
