#include <bits/stdc++.h>
using namespace std;
void redirect_input() { freopen("/home/chgtaxihe/in", "r", stdin); }
void redirect_output() { freopen("/home/chgtaxihe/out", "w", stdout); }
const int inf = 0x3f3f3f3f;
const double dinf = 1e301;
char s[200005];
int cnt[3][3] = {0};
void solve() {
  int n;
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    int k = 0;
    if (s[i] == 'G')
      k = 1;
    else if (s[i] == 'B')
      k = 2;
    cnt[i % 3][k]++;
  }
  int ans = inf;
  int res[3];
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      for (int k = 0; k < 3; k++) {
        if (i == j || i == k || j == k) continue;
        int temp = n - cnt[0][i] - cnt[1][j] - cnt[2][k];
        if (temp < ans) {
          ans = temp;
          res[0] = i, res[1] = j, res[2] = k;
        }
      }
    }
  }
  printf("%d\n", ans);
  char c[3];
  for (int i = 0; i < 3; i++) {
    if (res[i] == 0) c[i] = 'R';
    if (res[i] == 1) c[i] = 'G';
    if (res[i] == 2) c[i] = 'B';
  }
  for (int i = 0; i < n; i++) {
    putchar(c[i % 3]);
  }
}
int main() {
  int test_kase;
  solve();
}
