#include <bits/stdc++.h>
using namespace std;
void printv(vector<long long> v) {
  for (long long i = 0; i < v.size(); i++) cout << v[i] << ' ';
  cout << '\n';
}
long long be(long long m, long long n, long long mod) {
  long long res = 1;
  while (n) {
    if (n % 2 != 0) {
      res *= m;
      res %= mod;
    }
    m *= m;
    m %= mod;
    n /= 2;
  }
  return res;
}
void sieve(long long n, vector<bool> &prime) {
  prime[0] = false;
  prime[1] = false;
  for (long long i = 2; i * i <= n; i++) {
    if (prime[i] == true) {
      for (long long j = i * i; j <= n; j += i) prime[j] = false;
    }
  }
}
long long fun(string s, long long n, string a) {
  long long ans = INT_MAX;
  for (long long i = 0; i <= 2; i++) {
    long long cnt = 0;
    for (long long j = i; j < i + n; j++) {
      if (a[j] != s[j - i]) cnt++;
    }
    ans = min(ans, cnt);
  }
  return ans;
}
void solve() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  string t1 = "RGB";
  string t2 = "RBG";
  string a = "", b = "";
  for (long long i = 1; i <= 100000; i++) {
    a += t1;
    b += t2;
  }
  long long ans = INT_MAX;
  string str;
  for (long long i = 0; i <= 2; i++) {
    long long cnt = 0;
    for (long long j = i; j < i + n; j++) {
      if (a[j] != s[j - i]) cnt++;
    }
    if (ans > cnt) {
      ans = cnt;
      str = a.substr(i, n);
    }
  }
  for (long long i = 0; i <= 2; i++) {
    long long cnt = 0;
    for (long long j = i; j < i + n; j++) {
      if (b[j] != s[j - i]) cnt++;
    }
    if (ans > cnt) {
      ans = cnt;
      str = b.substr(i, n);
    }
  }
  cout << ans << '\n' << str << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
