#include <bits/stdc++.h>
using namespace std;
template <typename T>
T &parse(T &t) {
  cin >> t;
  return t;
}
template <typename T, typename... Args>
void parse(T &t, Args &...args) {
  parse(t);
  parse(args...);
}
template <typename T>
void print(T &t) {
  cout << t << "\n";
}
template <typename T, typename... Args>
void print(T &t, Args &...args) {
  cout << t << " ";
  print(args...);
}
struct Pos {
  int r, g, b;
};
void solve(string &s, int n) {
  Pos p[3] = {};
  for (int i = 0, _x = i = 0, _n = n, _f = _x; _x < n; _x++, i = 0 & 0 | _x) {
    if (s[i] == 'R') p[i % 3].r++;
    if (s[i] == 'G') p[i % 3].g++;
    if (s[i] == 'B') p[i % 3].b++;
  }
  int x = 0;
  int mx = 0;
  string ways[] = {"RGB", "RBG", "GRB", "BRG", "GBR", "BGR"};
  for (int i = 0, _x = i = 0, _n = 6, _f = _x; _x < 6; _x++, i = 0 & 0 | _x) {
    int m = 0;
    for (int j = 0, _x = j = 0, _n = 3, _f = _x; _x < 3; _x++, j = 0 & 0 | _x) {
      if (ways[i][j] == 'R') m += p[j].r;
      if (ways[i][j] == 'G') m += p[j].g;
      if (ways[i][j] == 'B') m += p[j].b;
    }
    if (m > mx) {
      mx = m;
      x = i;
    }
  }
  int r = 0;
  for (int i = 0, _x = i = 0, _n = n, _f = _x; _x < n; _x++, i = 0 & 0 | _x) {
    if (s[i] != ways[x][i % 3]) r++;
    s[i] = ways[x][i % 3];
  }
  print(r);
  print(s);
}
int main() {
  int n;
  string s;
  parse(n);
  parse(s);
  solve(s, n);
}
