#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int mincnt = n + 1;
  int r, g;
  for (int rpos = 0; rpos < 3; rpos++) {
    for (int gpos = 0; gpos < 3; gpos++) {
      if (rpos == gpos) continue;
      int cnt = 0;
      for (int i = 0; i < n; i++) {
        if (i % 3 - rpos == 0) {
          if (s[i] != 'R') cnt++;
        } else if (i % 3 - gpos == 0) {
          if (s[i] != 'G') cnt++;
        } else {
          if (s[i] != 'B') cnt++;
        }
      }
      if (mincnt > cnt) {
        mincnt = cnt;
        r = rpos;
        g = gpos;
      }
    }
  }
  cout << mincnt << endl;
  for (int i = 0; i < n; i++) {
    if (i % 3 == r) {
      cout << "R";
    } else if (i % 3 == g) {
      cout << "G";
    } else {
      cout << "B";
    }
  }
  cout << endl;
}
