#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long modexp(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  string s;
  cin >> n >> s;
  long long a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
  for (long long i = 0, _n = (s.length()); i < _n; i++) {
    if (s[i] == 'B') {
      if (i % 3 == 0) {
        e++;
        f++;
        c++;
        d++;
      } else if (i % 3 == 1) {
        d++;
        e++;
        a++;
        b++;
      } else {
        f++;
        c++;
        a++;
        b++;
      }
    } else if (s[i] == 'G') {
      if (i % 3 == 0) {
        e++;
        f++;
        a++;
        b++;
      } else if (i % 3 == 1) {
        a++;
        f++;
        c++;
        d++;
      } else {
        e++;
        b++;
        c++;
        d++;
      }
    } else {
      if (i % 3 == 0) {
        a++;
        b++;
        c++;
        d++;
      } else if (i % 3 == 1) {
        b++;
        c++;
        e++;
        f++;
      } else {
        a++;
        d++;
        e++;
        f++;
      }
    }
  }
  long long ma = min(a, min(b, min(c, min(d, min(e, f)))));
  cout << ma << endl;
  string s1 = "123";
  if (ma == a) {
    s1 = "BRG";
  } else if (ma == b) {
    s1 = "BGR";
  } else if (ma == c) {
    s1 = "GBR";
  } else if (ma == d) {
    s1 = "GRB";
  } else if (ma == e) {
    s1 = "RGB";
  } else if (ma == f) {
    s1 = "RBG";
  }
  for (long long i = 0, _n = (n); i < _n; i++) {
    cout << s1[i % 3];
  }
  return 0;
}
