#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long llinf = 0x3f3f3f3f3f3f3f3f;
template <typename INint>
inline void IN(INint &x) {
  x = 0;
  int f = 1;
  char c;
  cin.get(c);
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    cin.get(c);
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    cin.get(c);
  }
  x *= f;
}
template <typename INint>
inline void OUT(INint x) {
  if (x > 9) OUT(x / 10);
  cout.put(x % 10 + '0');
}
const int maxn = int();
map<char, char> ma;
int main() {
  int T(1), times(0);
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ma['G'] = 'B';
  ma['B'] = 'R';
  ma['R'] = 'G';
  while (++times, T--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    s = " " + s + " ";
    char c = ' ';
    int ans(0);
    int con = 1;
    for (int i = 1; i <= int(n + 1); i++) {
      char d = s[i];
      if (c != d) {
        ans += con / 2;
        if (con % 2 == 0) {
          int p = i - con;
          s[p] = ma[s[p]];
          if (s[p] == s[p - 1]) s[p] = ma[s[p]];
        }
        for (int j = 2; j < con; j += 2) s[i - j] = ma[s[i - j]];
        con = 1;
      } else
        ++con;
      c = d;
    }
    cout << ans << endl;
    cout << s.substr(1, n) << endl;
  }
  return 0;
}
