#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  long long int c = 0;
  vector<char> arr[6];
  for (long long int j = 0; j < 3; j++) {
    for (long long int i = 0; i < n; i++) {
      if (c == 0) {
        arr[j].push_back('R');
        c = 1;
        continue;
      }
      if (c == 1) {
        arr[j].push_back('B');
        c = 2;
        continue;
      }
      if (c == 2) {
        arr[j].push_back('G');
        c = 0;
        continue;
      }
    }
    c = j + 1;
  }
  c = 0;
  for (long long int j = 3; j < 6; j++) {
    for (long long int i = 0; i < n; i++) {
      if (c == 0) {
        arr[j].push_back('R');
        c = 1;
        continue;
      }
      if (c == 1) {
        arr[j].push_back('G');
        c = 2;
        continue;
      }
      if (c == 2) {
        arr[j].push_back('B');
        c = 0;
        continue;
      }
    }
    c = j + 1 - 3;
  }
  long long int mn = INT_MAX;
  long long int k = 0;
  for (long long int j = 0; j < 6; j++) {
    long long int count = 0;
    for (long long int i = 0; i < n; i++) {
      if (s[i] != arr[j][i]) {
        count++;
      }
    }
    if (mn > count) {
      mn = count;
      k = j;
    }
  }
  cout << mn << endl;
  for (long long int i = 0; i < n; i++) {
    cout << arr[k][i];
  }
}
int main() { solve(); }
