#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200100;
char int2char(const int i) {
  if (i == 0) {
    return 'R';
  }
  if (i == 1) {
    return 'G';
  }
  if (i == 2) {
    return 'B';
  }
}
int char2int(const char c) {
  if (c == 'R') {
    return 0;
  }
  if (c == 'G') {
    return 1;
  }
  if (c == 'B') {
    return 2;
  }
}
int main() {
  int n = 0;
  char s[MAX_N] = {0};
  scanf("%d %s", &n, s);
  int dp[MAX_N][3] = {0}, prev[MAX_N][3] = {0};
  for (int j = 0; j < 3; j++) {
    if (s[0] != int2char(j)) {
      dp[0][j] = 1;
    }
  }
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < 3; j++) {
      int addition = char2int(s[i]) == j ? 0 : 1;
      if (j == 0) {
        dp[i][j] = min(dp[i - 1][1], dp[i - 1][2]) + addition;
        if (dp[i - 1][1] < dp[i - 1][2]) {
          prev[i][j] = 1;
        } else {
          prev[i][j] = 2;
        }
      } else if (j == 1) {
        dp[i][j] = min(dp[i - 1][0], dp[i - 1][2]) + addition;
        if (dp[i - 1][0] < dp[i - 1][2]) {
          prev[i][j] = 0;
        } else {
          prev[i][j] = 2;
        }
      } else {
        dp[i][j] = min(dp[i - 1][0], dp[i - 1][1]) + addition;
        if (dp[i - 1][0] < dp[i - 1][1]) {
          prev[i][j] = 0;
        } else {
          prev[i][j] = 1;
        }
      }
    }
  }
  int ans = min(dp[n - 1][0], min(dp[n - 1][1], dp[n - 1][2]));
  printf("%d\n", ans);
  int last_color = 0;
  if (dp[n - 1][0] < dp[n - 1][1] && dp[n - 1][0] < dp[n - 1][2]) {
    last_color = 0;
  } else if (dp[n - 1][1] < dp[n - 1][0] && dp[n - 1][1] < dp[n - 1][2]) {
    last_color = 1;
  } else {
    last_color = 2;
  }
  stack<char> st;
  for (int i = n - 1; i > 0; i--) {
    st.push(int2char(last_color));
    last_color = prev[i][last_color];
  }
  st.push(int2char(last_color));
  while (!st.empty()) {
    printf("%c", st.top());
    st.pop();
  }
  printf("\n");
  return 0;
}
