#include <bits/stdc++.h>
using namespace std;
int n, ans, xs;
int A[200000 + 5];
int tot[3][4];
char zm[3] = {'R', 'G', 'B'};
int main() {
  cin >> n;
  char c;
  for (int i = 1; i <= n; i++) {
    cin >> c;
    if (c == 'R')
      A[i] = 0;
    else if (c == 'G')
      A[i] = 1;
    else if (c == 'B')
      A[i] = 2;
    tot[i % 3][A[i]]++;
  }
  for (int i1 = 0; i1 < 3; i1++) {
    for (int i2 = 0; i2 < 3; i2++) {
      if (i2 == i1) continue;
      for (int i3 = 0; i3 < 3; i3++) {
        if (i1 == i3 || i2 == i3) continue;
        int cost = n - tot[0][i1] - tot[1][i2] - tot[2][i3];
        if (!xs || ans > cost) {
          ans = cost;
          xs = i1 * 100 + i2 * 10 + i3;
        }
      }
    }
  }
  char temp[3];
  temp[0] = zm[xs / 100];
  temp[1] = zm[xs / 10 % 10];
  temp[2] = zm[xs % 10];
  cout << ans << endl;
  for (int i = 1; i <= n; i++) {
    cout << temp[i % 3];
  }
  return 0;
}
