#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
int inf = 1e9 + 5;
const double PI = 3.1415926535897932384626433832795;
vector<long long> d;
vector<char> c;
void cnt(long long n, vector<long long>& arr) {
  for (int i = 1; i <= n; ++i) {
    if (n % i == 0) {
      d.push_back(i);
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  c.push_back('R');
  c.push_back('G');
  c.push_back('B');
  map<char, int> ind;
  ind['R'] = 0;
  ind['G'] = 1;
  ind['B'] = 2;
  if (n == 1) {
    cout << 0 << endl << s;
  } else if (n == 2) {
    if (s[0] != s[1]) {
      cout << 0 << endl << s;
    } else {
      cout << 1 << endl << s[0] << c[(!ind[s[1]])];
    }
  } else {
    vector<string> path;
    path.push_back("RGB");
    path.push_back("RBG");
    path.push_back("GRB");
    path.push_back("GBR");
    path.push_back("BRG");
    path.push_back("BGR");
    int mi = 1e9;
    string res;
    for (auto& p : path) {
      int sum = 0;
      for (int i = 0; i < n; ++i) {
        if (p[i % 3] != s[i]) sum++;
      }
      if (sum < mi) {
        mi = sum;
        res = p;
      }
    }
    cout << mi << endl;
    for (int i = 0; i < n; ++i) {
      cout << res[i % 3];
    }
  }
  return 0;
}
