#include <bits/stdc++.h>
using namespace std;
char arr[3] = {'B', 'G', 'R'};
int main() {
  int n, c = 0;
  string s;
  pair<int, int> mn = make_pair(INT_MAX, 0);
  cin >> n >> s;
  do {
    int ans = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] != arr[i % 3]) {
        ans++;
      }
    }
    if (mn.first > ans) {
      mn.first = ans;
      mn.second = c;
    }
    c++;
  } while (next_permutation(arr, arr + 3));
  cout << mn.first << endl;
  sort(arr, arr + 3);
  while (mn.second--) next_permutation(arr, arr + 3);
  for (int i = 0; i < n; i++) {
    cout << arr[i % 3];
  }
  return 0;
}
