#include <bits/stdc++.h>
using namespace std;
pair<int, string> pr[100];
vector<string> v;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  string s;
  cin >> n >> s;
  if (n == 1) {
    cout << 0 << endl << s << endl;
    return 0;
  }
  if (n == 2) {
    char c1 = s.at(0);
    char c2 = s.at(1);
    if (c1 != c2) {
      cout << 0 << endl << s << endl;
    } else {
      if (c1 == 'R') {
        c2 = 'G';
      } else if (c1 == 'G') {
        c2 = 'B';
      }
      if (c1 == 'B') {
        c2 = 'R';
      }
      cout << 1 << endl << c1 << c2 << endl;
    }
    return 0;
  }
  v.push_back("RGB");
  v.push_back("RBG");
  v.push_back("GBR");
  v.push_back("GRB");
  v.push_back("BRG");
  v.push_back("BGR");
  for (int i = 0; i < v.size(); i++) {
    string p = v[i];
    char c1 = p.at(0);
    char c2 = p.at(1);
    char c3 = p.at(2);
    p = "";
    p += c1;
    p += c2;
    p += c3;
    for (int i = 3; i < n; i++) {
      if (i % 3 == 0) {
        p += c1;
      } else if (i % 3 == 1) {
        p += c2;
      } else if (i % 3 == 2) {
        p += c3;
      }
    }
    int x = 0;
    for (int i = 0; i < n; i++) {
      if (p[i] != s[i]) {
        x++;
      }
    }
    pr[i].first = x;
    pr[i].second = p;
  }
  sort(pr, pr + v.size());
  cout << pr[0].first << endl << pr[0].second << endl;
  return 0;
}
