#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5;
const int INF = 1e9 + 1e5 + 2;
const int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  map<int, string> mp;
  mp[1] = "RGB";
  mp[2] = "RBG";
  mp[3] = "BRG";
  mp[4] = "BGR";
  mp[5] = "GBR";
  mp[6] = "GRB";
  string second;
  cin >> second;
  int ans = 1e6;
  string anss;
  for (int i = 1; i <= 6; i++) {
    string x = mp[i];
    int sum = 0;
    for (int j = 0; j < n; j += 3) {
      if (x[0] != second[j]) ++sum;
      if (x[1] != second[j + 1] && j + 1 < n) ++sum;
      if (x[2] != second[j + 2] && j + 2 < n) ++sum;
    }
    if (sum < ans) {
      ans = sum;
      anss = x;
    }
  }
  cout << ans << "\n";
  for (int i = 0; i < n / 3; i++) cout << anss;
  int y = n % 3;
  for (int i = 0; i < y; i++) cout << anss[i];
}
