#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    long long n;
    cin >> n;
    string s;
    cin >> s;
    string a, b, c, d, e, f;
    long long i = 0;
    long long i2 = n % 3;
    while (i < n) {
      a.push_back('R');
      a.push_back('B');
      a.push_back('G');
      b.push_back('R');
      b.push_back('G');
      b.push_back('B');
      c.push_back('B');
      c.push_back('R');
      c.push_back('G');
      d.push_back('B');
      d.push_back('G');
      d.push_back('R');
      e.push_back('G');
      e.push_back('B');
      e.push_back('R');
      f.push_back('G');
      f.push_back('R');
      f.push_back('B');
      i = i + 3;
    }
    if (i2 == 1) {
      a.push_back('R');
      b.push_back('R');
      c.push_back('B');
      d.push_back('B');
      e.push_back('G');
      f.push_back('G');
    }
    if (n == 2) {
      a.push_back('R');
      a.push_back('B');
      b.push_back('R');
      b.push_back('G');
      c.push_back('B');
      c.push_back('R');
      d.push_back('B');
      d.push_back('G');
      e.push_back('G');
      e.push_back('B');
      f.push_back('G');
      f.push_back('R');
    }
    long long t1 = 0;
    long long t2 = 0;
    long long t3 = 0;
    long long t4 = 0;
    long long t5 = 0;
    long long t6 = 0;
    for (long long i = 0; i < n; ++i) {
      if (s[i] != a[i]) t1++;
      if (s[i] != b[i]) t2++;
      if (s[i] != c[i]) t3++;
      if (s[i] != d[i]) t4++;
      if (s[i] != e[i]) t5++;
      if (s[i] != f[i]) t6++;
    }
    long long y = min(t1, t2);
    y = min(y, t2);
    y = min(y, t3);
    y = min(y, t4);
    y = min(y, t5);
    y = min(y, t6);
    cout << y << '\n';
    if (y == t1)
      for (long long i = 0; i < n; i++) {
        cout << a[i];
      }
    else if (y == t2)
      for (long long i = 0; i < n; i++) {
        cout << b[i];
      }
    else if (y == t3)
      for (long long i = 0; i < n; i++) {
        cout << c[i];
      }
    else if (y == t4)
      for (long long i = 0; i < n; i++) {
        cout << d[i];
      }
    else if (y == t5)
      for (long long i = 0; i < n; i++) {
        cout << e[i];
      }
    else
      for (long long i = 0; i < n; i++) {
        cout << f[i];
      }
  }
  return 0;
}
