#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  string tmp = "RGB";
  int id[200];
  id['R'] = 0, id['G'] = 1, id['B'] = 2;
  vector<vector<int>> dp(n + 1, vector<int>(3, (int)(1e9)));
  vector<vector<int>> from(n + 1, vector<int>(3));
  for (int i = 0; i < 3; i++) dp[1][i] = id[s[0]] != i;
  for (int i = 2; i <= n; i++)
    for (int j = 0; j < 3; j++)
      for (int k = 0; k < 3; k++)
        if (k != j) {
          int v = dp[i - 1][k] + (id[s[i - 1]] != j);
          if (v < dp[i][j]) {
            dp[i][j] = v;
            from[i][j] = k;
          }
        }
  string ans = "";
  int mn = *min_element(dp[n].begin(), dp[n].end());
  int cur;
  for (int i = 0; i < 3; i++)
    if (dp[n][i] == mn) {
      cur = i;
      break;
    }
  for (int i = n; i > 0; i--) {
    ans += tmp[cur];
    cur = from[i][cur];
  }
  reverse(ans.begin(), ans.end());
  cout << *min_element(dp[n].begin(), dp[n].end()) << endl << ans << endl;
}
