#include <bits/stdc++.h>
using namespace std;
string a[9] = {"GRB", "GBR", "BRG", "BGR", "RGB", "RBG"}, s, s1[9];
int m, n, b, c, d, e, ans = 100000000;
int main() {
  cin >> m;
  cin >> s;
  for (int y = 0; y < 6; y++) {
    b = 0;
    for (int x = 0; x < m; x++) {
      s1[y] += a[y][x % 3];
    }
    for (int x = 0; x < m; x++) {
      if (s[x] != s1[y][x]) {
        b++;
      }
    }
    if (ans > b) {
      ans = b;
      c = y;
    }
  }
  cout << ans << endl;
  cout << s1[c] << endl;
}
