#include <bits/stdc++.h>
using namespace std;
int n;
const int MAX_N = 2e5 + 10;
char ch[MAX_N];
int a[3], b[3], c[3], x, y, z;
int main() {
  cin >> n >> ch;
  memset(a, 0, sizeof(a));
  memset(c, 0, sizeof(c));
  memset(b, 0, sizeof(b));
  for (int i = 0; i < n; i++) {
    int t = i % 3;
    switch (ch[i]) {
      case 'R':
        b[t]++;
        c[t]++;
        break;
      case 'G':
        a[t]++;
        c[t]++;
        break;
      case 'B':
        a[t]++;
        b[t]++;
        break;
    }
  }
  x = 0;
  y = 1;
  z = 2;
  int cost = a[0] + b[1] + c[2];
  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) {
          if (cost > a[i] + b[j] + c[k]) {
            x = i;
            y = j;
            z = k;
            cost = a[i] + b[j] + c[k];
          }
        }
      }
    }
  }
  cout << cost << endl;
  for (int i = 0; i < n; i++) {
    int t = i % 3;
    if (t == x)
      printf("R");
    else if (t == y)
      printf("G");
    else if (t == z)
      printf("B");
  }
  return 0;
}
