#include <bits/stdc++.h>
const double eps = (1e-9);
using namespace std;
int dcmp(long double a, long double b) {
  return fabsl(a - b) <= eps ? 0 : (a > b) ? 1 : -1;
}
int getBit(long long num, int idx) { return ((num >> idx) & 1ll) == 1; }
int setBit1(int num, int idx) { return num | (1 << idx); }
long long setBit0(long long num, int idx) { return num & ~(1ll << idx); }
long long flipBit(long long num, int idx) { return num ^ (1ll << idx); }
void M() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int countNumBit1(int mask) {
  int ret = 0;
  while (mask) {
    mask &= (mask - 1);
    ++ret;
  }
  return ret;
}
string st;
int n;
int main() {
  M();
  cin >> n >> st;
  char c1, c2, c3, F, S, T;
  int mi = INT_MAX;
  for (int i = 1; i <= 3; i++) {
    for (int j = 1; j <= 3; j++) {
      for (int k = 1; k <= 3; k++) {
        int cnt1 = 0, cnt2 = 0, cnt3 = 0;
        if (i == j || i == k || j == k) continue;
        c1 = (i == 1 ? 'R' : (i == 2 ? 'B' : 'G'));
        c2 = (j == 1 ? 'R' : (j == 2 ? 'B' : 'G'));
        c3 = (k == 1 ? 'R' : (k == 2 ? 'B' : 'G'));
        for (int l = 0; l < n; l += 3) {
          if (st[l] != c1) cnt1++;
        }
        for (int l = 1; l < n; l += 3) {
          if (st[l] != c2) cnt2++;
        }
        for (int l = 2; l < n; l += 3) {
          if (st[l] != c3) cnt3++;
        }
        long long ans = cnt1 + cnt2 + cnt3;
        if (ans < mi) {
          mi = ans;
          F = c1;
          S = c2;
          T = c3;
        }
      }
    }
  }
  for (int l = 0; l < n; l += 3) {
    st[l] = F;
  }
  for (int l = 1; l < n; l += 3) {
    st[l] = S;
  }
  for (int l = 2; l < n; l += 3) {
    st[l] = T;
  }
  cout << mi << endl << st << endl;
}
