#include <bits/stdc++.h>
using namespace std;
int dp[200009][3];
string s;
int n;
int solve(int idx, int prev) {
  if (idx == n) return 0;
  int &c = dp[idx][prev];
  if (c != -1) return c;
  c = 1e9;
  if (prev == 0) {
    c = min(c, solve(idx + 1, 1) + (s[idx] != 'G'));
    c = min(c, solve(idx + 1, 2) + (s[idx] != 'B'));
  }
  if (prev == 1) {
    c = min(c, solve(idx + 1, 0) + (s[idx] != 'R'));
    c = min(c, solve(idx + 1, 2) + (s[idx] != 'B'));
  }
  if (prev == 2) {
    c = min(c, solve(idx + 1, 1) + (s[idx] != 'G'));
    c = min(c, solve(idx + 1, 0) + (s[idx] != 'R'));
  }
  return c;
}
void follow(int idx, int prev) {
  if (idx == n) return;
  if (prev == 0) {
    int c1 = 1e9, c2 = 1e9;
    c1 = solve(idx + 1, 1) + (s[idx] != 'G');
    c2 = solve(idx + 1, 2) + (s[idx] != 'B');
    if (c1 < c2) {
      cout << "G";
      follow(idx + 1, 1);
    } else {
      cout << "B";
      follow(idx + 1, 2);
    }
  }
  if (prev == 1) {
    int c1 = 1e9, c2 = 1e9;
    c1 = min(c1, solve(idx + 1, 0) + (s[idx] != 'R'));
    c2 = min(c2, solve(idx + 1, 2) + (s[idx] != 'B'));
    if (c1 < c2) {
      cout << "R";
      follow(idx + 1, 0);
    } else {
      cout << "B";
      follow(idx + 1, 2);
    }
  }
  if (prev == 2) {
    int c1 = 1e9, c2 = 1e9;
    c1 = min(c1, solve(idx + 1, 1) + (s[idx] != 'G'));
    c2 = min(c2, solve(idx + 1, 0) + (s[idx] != 'R'));
    if (c1 < c2) {
      cout << "G";
      follow(idx + 1, 1);
    } else {
      cout << "R";
      follow(idx + 1, 0);
    }
  }
}
int main() {
  cin >> n >> s;
  memset(dp, -1, sizeof(dp));
  int c1 = solve(0, 0);
  int c2 = solve(0, 1);
  int c3 = solve(0, 2);
  cout << min(c1, min(c2, c3)) << endl;
  if (c1 <= min(c2, c3)) {
    follow(0, 0);
  } else if (c2 <= min(c1, c3)) {
    follow(0, 1);
  } else if (c3 <= min(c2, c1)) {
    follow(0, 2);
  }
  return 0;
}
