#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 3;
int n;
string s;
int cost[N][3];
pair<int, int> parent[N][3];
char color[3] = {'R', 'G', 'B'};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s;
  for (int i = 0; i < n; ++i) cost[i][0] = cost[i][1] = cost[i][2] = INT_MAX;
  cost[0][0] = 1 - (s[0] == 'R');
  parent[0][0] = {-1, -1};
  cost[0][1] = 1 - (s[0] == 'G');
  parent[0][1] = {-1, -1};
  cost[0][2] = 1 - (s[0] == 'B');
  parent[0][2] = {-1, -1};
  for (int i = 1; i < n; ++i) {
    int add[3];
    add[0] = 1 - (s[i] == 'R');
    add[1] = 1 - (s[i] == 'G');
    add[2] = 1 - (s[i] == 'B');
    for (int c1 = 0; c1 < 3; ++c1) {
      for (int c2 = 0; c2 < 3; ++c2) {
        if (c1 == c2) continue;
        if (cost[i][c1] > cost[i - 1][c2] + add[c1]) {
          cost[i][c1] = cost[i - 1][c2] + add[c1];
          parent[i][c1] = {i - 1, c2};
        }
      }
    }
  }
  if (cost[n - 1][0] < min(cost[n - 1][1], cost[n - 1][2])) {
    string res = "";
    res += color[0];
    pair<int, int> p = parent[n - 1][0];
    while (p != make_pair(-1, -1)) {
      res += color[p.second];
      p = parent[p.first][p.second];
    }
    reverse(res.begin(), res.end());
    cout << cost[n - 1][0] << '\n';
    cout << res << '\n';
  } else if (cost[n - 1][1] < min(cost[n - 1][0], cost[n - 1][2])) {
    string res = "";
    res += color[1];
    pair<int, int> p = parent[n - 1][1];
    while (p != make_pair(-1, -1)) {
      res += color[p.second];
      p = parent[p.first][p.second];
    }
    reverse(res.begin(), res.end());
    cout << cost[n - 1][1] << '\n';
    cout << res << '\n';
  } else {
    string res = "";
    res += color[2];
    pair<int, int> p = parent[n - 1][2];
    while (p != make_pair(-1, -1)) {
      res += color[p.second];
      p = parent[p.first][p.second];
    }
    reverse(res.begin(), res.end());
    cout << cost[n - 1][2] << '\n';
    cout << res << '\n';
  }
  if (0) cout << "Time: " << (double)clock() / CLOCKS_PER_SEC << "s" << '\n';
  return 0;
}
