#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, sum = 0;
  string s;
  cin >> n >> s;
  long long l, r;
  l = -1;
  r = -1;
  int flg[3];
  for (long long i = 1; i < s.length(); i++) {
    if (s[i] == s[i - 1]) {
      if (l != -1)
        r = i;
      else {
        l = i - 1;
        r = i;
      }
      if (i == s.length() - 1) {
        sum += (abs(r - l) + 1) / 2;
        if ((abs(r - l) + 1) % 2 == 1) {
          l++;
        }
        for (long long j = l; j <= r && j >= 0 && j < s.length(); j += 2) {
          flg[0] = 0;
          flg[1] = 0;
          flg[2] = 0;
          if (s[j - 1] == 'R') flg[0] = 1;
          if (s[j - 1] == 'G') flg[1] = 1;
          if (s[j - 1] == 'B') {
            flg[2] = 1;
          }
          if (s[j + 1] == 'R') flg[0] = 1;
          if (s[j + 1] == 'G') flg[1] = 1;
          if (s[j + 1] == 'B') {
            flg[2] = 1;
          }
          if (flg[0] == 0) s[j] = 'R';
          if (flg[1] == 0) s[j] = 'G';
          if (flg[2] == 0) s[j] = 'B';
        }
        l = -1;
        r = -1;
      }
    } else {
      sum += (abs(r - l) + 1) / 2;
      if ((abs(r - l) + 1) % 2 == 1) {
        l++;
      }
      for (long long j = l; j <= r && j >= 0 && j < s.length(); j += 2) {
        flg[0] = 0;
        flg[1] = 0;
        flg[2] = 0;
        if (s[j - 1] == 'R') flg[0] = 1;
        if (s[j - 1] == 'G') flg[1] = 1;
        if (s[j - 1] == 'B') flg[2] = 1;
        if (s[j + 1] == 'R') flg[0] = 1;
        if (s[j + 1] == 'G') flg[1] = 1;
        if (s[j + 1] == 'B') flg[2] = 1;
        if (flg[0] == 0) s[j] = 'R';
        if (flg[1] == 0) s[j] = 'G';
        if (flg[2] == 0) s[j] = 'B';
      }
      l = -1;
      r = -1;
    }
  }
  cout << sum << endl;
  cout << s;
}
