#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
string A1 = "RGB";
string A2 = "RBG";
string A3 = "BGR";
string A4 = "BRG";
string A5 = "GBR";
string A6 = "GRB";
int main() {
  int n, i;
  cin >> n;
  string t, s1, s2, s3, s4, s5, s6;
  cin >> t;
  int k = t.length();
  int l;
  if (k % 3 == 0) {
    l = k / 3;
  } else {
    l = (k / 3) + 1;
  }
  for (int i = 0; i < l; i++) {
    s1 += A1;
  }
  int diff = s1.length() - t.length();
  s1 = s1.substr(0, (3 * l) - diff);
  for (int i = 0; i < l; i++) {
    s2 += A2;
  }
  s2 = s2.substr(0, (3 * l) - diff);
  for (int i = 0; i < l; i++) {
    s3 += A3;
  }
  s3 = s3.substr(0, (3 * l) - diff);
  for (int i = 0; i < l; i++) {
    s4 += A4;
  }
  s4 = s4.substr(0, (3 * l) - diff);
  for (int i = 0; i < l; i++) {
    s5 += A5;
  }
  s5 = s5.substr(0, (3 * l) - diff);
  for (int i = 0; i < l; i++) {
    s6 += A6;
  }
  s6 = s6.substr(0, (3 * l) - diff);
  int minn = 1e9, c1, c2, c3, c4, c5, c6, index;
  vector<int> v;
  c1 = c2 = c3 = c4 = c5 = c6 = 0;
  for (int i = 0; i < k; i++) {
    if (t[i] != s1[i]) {
      c1++;
    }
  }
  minn = min(minn, c1);
  for (int i = 0; i < k; i++) {
    if (t[i] != s2[i]) {
      c2++;
    }
  }
  minn = min(minn, c2);
  for (int i = 0; i < k; i++) {
    if (t[i] != s3[i]) {
      c3++;
    }
  }
  minn = min(minn, c3);
  for (int i = 0; i < k; i++) {
    if (t[i] != s4[i]) {
      c4++;
    }
  }
  minn = min(minn, c4);
  for (int i = 0; i < k; i++) {
    if (t[i] != s5[i]) {
      c5++;
    }
  }
  minn = min(minn, c5);
  for (int i = 0; i < k; i++) {
    if (t[i] != s6[i]) {
      c6++;
    }
  }
  minn = min(minn, c6);
  v.push_back(c1);
  v.push_back(c2);
  v.push_back(c3);
  v.push_back(c4);
  v.push_back(c5);
  v.push_back(c6);
  for (int i = 0; i < v.size(); i++) {
    if (v[i] == minn) {
      index = i;
      break;
    }
  }
  cout << minn << '\n';
  if (index == 0) {
    cout << s1 << '\n';
  } else if (index == 1) {
    cout << s2 << '\n';
  } else if (index == 2) {
    cout << s3 << '\n';
  } else if (index == 3) {
    cout << s4 << '\n';
  } else if (index == 4) {
    cout << s5 << '\n';
  } else if (index == 5) {
    cout << s6 << '\n';
  }
  return 0;
}
