#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, a, b, c, d, e, f;
  int n;
  cin >> n;
  cin >> s;
  a = "RGB";
  b = "RBG";
  c = "GRB";
  d = "GBR";
  e = "BRG";
  f = "BGR";
  int cur = 0;
  int counta = 0, countb = 0, countc = 0, countd = 0, counte = 0, countf = 0;
  for (int i = 0; i < s.length(); i++) {
    if (a[cur] != s[i]) {
      counta++;
    }
    if (b[cur] != s[i]) {
      countb++;
    }
    if (c[cur] != s[i]) {
      countc++;
    }
    if (d[cur] != s[i]) {
      countd++;
    }
    if (e[cur] != s[i]) {
      counte++;
    }
    if (f[cur] != s[i]) {
      countf++;
    }
    cur++;
    cur %= 3;
  }
  int ans =
      min(counta, min(countb, min(countc, min(countd, min(counte, countf)))));
  if (ans == counta) {
    cout << ans << "\n";
    for (int i = 0; i < s.length(); i++) {
      cout << a[i % 3];
    }
    return 0;
  }
  if (ans == countb) {
    cout << ans << "\n";
    for (int i = 0; i < s.length(); i++) {
      cout << b[i % 3];
    }
    return 0;
  }
  if (ans == countc) {
    cout << ans << "\n";
    for (int i = 0; i < s.length(); i++) {
      cout << c[i % 3];
    }
    return 0;
  }
  if (ans == countd) {
    cout << ans << "\n";
    for (int i = 0; i < s.length(); i++) {
      cout << d[i % 3];
    }
    return 0;
  }
  if (ans == counte) {
    cout << ans << "\n";
    for (int i = 0; i < s.length(); i++) {
      cout << e[i % 3];
    }
    return 0;
  }
  if (ans == countf) {
    cout << ans << "\n";
    for (int i = 0; i < s.length(); i++) {
      cout << f[i % 3];
    }
    return 0;
  }
}
