#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  string ref = "RGB";
  int dp[n + 1][3];
  dp[0][0] = 0;
  dp[0][1] = 0;
  dp[0][2] = 0;
  pair<int, int> parent[n + 1][3];
  parent[0][0] = {-1, -1};
  parent[0][1] = {-1, -1};
  parent[0][2] = {-1, -1};
  for (int i = 1; i < n + 1; ++i) {
    for (int j = 0; j < 3; j++) {
      int k1, k2;
      if (j == 0) {
        k1 = 1;
        k2 = 2;
      }
      if (j == 1) {
        k1 = 0;
        k2 = 2;
      }
      if (j == 2) {
        k1 = 0;
        k2 = 1;
      }
      if (dp[i - 1][k1] < dp[i - 1][k2]) {
        dp[i][j] = dp[i - 1][k1];
        parent[i][j] = {i - 1, k1};
      } else {
        dp[i][j] = dp[i - 1][k2];
        parent[i][j] = {i - 1, k2};
      }
      if (ref[j] != s[i - 1]) dp[i][j]++;
    }
  }
  int last;
  if (dp[n][0] <= dp[n][1] && dp[n][0] <= dp[n][2]) {
    last = 0;
  } else if (dp[n][1] <= dp[n][2]) {
    last = 1;
  } else {
    last = 2;
  }
  int u = last;
  string ans = "";
  int ctr = n;
  while (ctr != 0) {
    ans = ref[last] + ans;
    last = parent[ctr][last].second;
    ctr--;
  }
  cout << dp[n][u] << endl;
  cout << ans;
}
