#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("unroll-loops")
const int MOD = 1000000007;
void setIO(string s) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  freopen((s + ".in").c_str(), "r", stdin);
  freopen((s + ".out").c_str(), "w", stdout);
}
const int ns = 2 * 1e5;
int n;
string s;
int dp[ns][3];
int str[ns][3];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  cin >> s;
  dp[0][0] = 1;
  dp[0][1] = 1;
  dp[0][2] = 1;
  if (s[0] == 'R') dp[0][0]--;
  if (s[0] == 'G') dp[0][1]--;
  if (s[0] == 'B') dp[0][2]--;
  for (int i = 0; i < 3; i++) str[0][i] = i;
  for (int i = 1; i < n; i++) {
    dp[i][0] = min(dp[i - 1][1], dp[i - 1][2]) + (s[i] == 'R' ? 0 : 1);
    dp[i][1] = min(dp[i - 1][0], dp[i - 1][2]) + (s[i] == 'G' ? 0 : 1);
    dp[i][2] = min(dp[i - 1][1], dp[i - 1][0]) + (s[i] == 'B' ? 0 : 1);
    str[i][0] = dp[i - 1][1] < dp[i - 1][2] ? 1 : 2;
    str[i][1] = dp[i - 1][0] < dp[i - 1][2] ? 0 : 2;
    str[i][2] = dp[i - 1][1] < dp[i - 1][0] ? 1 : 0;
  }
  int start;
  if (dp[n - 1][0] <= dp[n - 1][1]) {
    if (dp[n - 1][0] <= dp[n - 1][2])
      start = 0;
    else
      start = 2;
  } else {
    if (dp[n - 1][1] <= dp[n - 1][2])
      start = 1;
    else
      start = 2;
  }
  char cs[3] = {'R', 'G', 'B'};
  string ans = "";
  for (int i = n - 1; i >= 0; i--) {
    ans = cs[start] + ans;
    start = str[i][start];
  }
  cout << min(dp[n - 1][0], min(dp[n - 1][1], dp[n - 1][2])) << endl
       << ans << endl;
  return 0;
}
