#include <bits/stdc++.h>
using namespace std;
const long long N = 1e9 + 7;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = ((res) * (x));
    res %= N;
    y = y >> 1;
    x = ((x) * (x));
  }
  return res;
}
long long powmod(long long a, long long b, long long n) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x * y) % n;
    }
    y = (y * y) % n;
    b /= 2;
  }
  return x % n;
}
bool sortbyval(pair<long long, long long>& p1, pair<long long, long long>& p2) {
  return p1.second < p2.second;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n, cnt = 0, mini = INT_MAX, k;
    cin >> n;
    string s;
    cin >> s;
    string a[] = {"RGB", "RBG", "GBR", "GRB", "BGR", "BRG"};
    for (long long i = 0; i < 6; i++) {
      long long cnt = 0;
      for (long long j = 0; j < s.length(); j++) {
        if (s[j] != a[i][j % 3]) cnt++;
      }
      if (cnt < mini) {
        mini = cnt;
        k = i;
      }
    }
    cout << mini << '\n';
    for (long long i = 0; i < s.length(); i++) cout << a[k][i % 3];
  }
  return 0;
}
