#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
pair<int, string> func(string a, int n, string b, int m) {
  int cost = 0;
  for (int i = 0; i <= n - m; i++) {
    if (a.substr(i, m) != b) {
      for (int j = 0; j < m; j++) {
        if (b[j] != a[i + j]) {
          cost++;
          a[i + j] = b[j];
        }
      }
    }
    char x = b[0];
    for (int j = 0; j < m - 1; j++) b[j] = b[j + 1];
    b[m - 1] = x;
  }
  return make_pair(cost, a);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  string second;
  cin >> second;
  if (n == 1) {
    cout << "0\n";
    cout << second << endl;
    return 0;
  }
  if (n == 2) {
    vector<pair<int, string> > v;
    v.push_back(func(second, n, "RG", 2));
    v.push_back(func(second, n, "RB", 2));
    v.push_back(func(second, n, "GR", 2));
    v.push_back(func(second, n, "GB", 2));
    v.push_back(func(second, n, "BR", 2));
    v.push_back(func(second, n, "BG", 2));
    sort(v.begin(), v.end());
    cout << v[0].first << endl << v[0].second << endl;
    return 0;
  }
  vector<pair<int, string> > v;
  v.push_back(func(second, n, "RGB", 3));
  v.push_back(func(second, n, "RBG", 3));
  v.push_back(func(second, n, "BGR", 3));
  v.push_back(func(second, n, "BRG", 3));
  v.push_back(func(second, n, "GBR", 3));
  v.push_back(func(second, n, "GRB", 3));
  sort(v.begin(), v.end());
  cout << v[0].first << endl << v[0].second << endl;
  return 0;
}
