#include <bits/stdc++.h>
using namespace std;
char color[3] = {'R', 'G', 'B'};
int counts = 0, counts1 = 0, counts2 = 0, counts3 = 0;
int countx[6];
int main() {
  vector<char> v, v1, v2, v3, v4, v5, v6;
  int i, len, maxx = 0;
  char x;
  char *p = NULL, *s = NULL;
  cin >> len;
  if (len > 2) {
    for (i = 0; i < len; i++) {
      v1.push_back(color[i % 3]);
      v2.push_back(color[(i + 1) % 3]);
      v3.push_back(color[(i + 2) % 3]);
      v4.push_back(color[2 - (i % 3)]);
      v5.push_back(color[2 - ((i + 1) % 3)]);
      v6.push_back(color[2 - ((i + 2) % 3)]);
    }
  }
  for (i = 0; i < len; i++) {
    cin >> x;
    v.push_back(x);
  }
  s = v.data();
  if (len == 2) {
    p = s + 1;
    if (*p == *s) {
      for (i = 0; i < 3; i++) {
        if (color[i] != *p) {
          *p = color[i];
          counts++;
          break;
        }
      }
    }
  } else if (len > 2) {
    for (i = 0; i < 6; i++) countx[i] = 0;
    for (i = 0; i < len; i++) {
      if (v[i] != v1[i]) countx[0]++;
      if (v[i] != v2[i]) countx[1]++;
      if (v[i] != v3[i]) countx[2]++;
      if (v[i] != v4[i]) countx[3]++;
      if (v[i] != v5[i]) countx[4]++;
      if (v[i] != v6[i]) countx[5]++;
    }
    maxx = countx[0];
    for (i = 0; i < 6; i++) {
      if (countx[i] < maxx) maxx = countx[i];
    }
    counts = maxx;
    if (maxx == countx[0])
      s = v1.data();
    else if (maxx == countx[1])
      s = v2.data();
    else if (maxx == countx[2])
      s = v3.data();
    else if (maxx == countx[3])
      s = v4.data();
    else if (maxx == countx[4])
      s = v5.data();
    else
      s = v6.data();
  }
  cout << counts << "\n";
  for (p = s; p != s + len; p++) {
    cout << *p;
  }
}
