#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  string s;
  long long int count = 0;
  cin >> s;
  long long int x = n % 3;
  long long int y = n / 3;
  string s1 = "RGB";
  long long int ind = 0;
  long long int res = 0, res1 = 0, res2 = 0, res3 = 0, res4 = 0, res5 = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] != s1[ind]) {
      res++;
    }
    ind++;
    if (ind > 2) {
      ind = 0;
    }
  }
  s1 = "GRB";
  ind = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] != s1[ind]) {
      res1++;
    }
    ind++;
    if (ind > 2) {
      ind = 0;
    }
  }
  s1 = "BGR";
  ind = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] != s1[ind]) {
      res2++;
    }
    ind++;
    if (ind > 2) {
      ind = 0;
    }
  }
  s1 = "BRG";
  ind = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] != s1[ind]) {
      res3++;
    }
    ind++;
    if (ind > 2) {
      ind = 0;
    }
  }
  s1 = "RBG";
  ind = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] != s1[ind]) {
      res4++;
    }
    ind++;
    if (ind > 2) {
      ind = 0;
    }
  }
  s1 = "GBR";
  ind = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] != s1[ind]) {
      res5++;
    }
    ind++;
    if (ind > 2) {
      ind = 0;
    }
  }
  long long int ans = 0;
  if (res <= res1 && res <= res2 && res <= res3 && res <= res4 && res <= res5) {
    s1 = "RGB";
    ans = res;
    ind = 0;
    for (long long int i = 0; i < n; i++) {
      s[i] = s1[ind];
      ind++;
      if (ind > 2) {
        ind = 0;
      }
    }
  } else if (res1 <= res && res1 <= res2 && res1 <= res3 && res1 <= res4 &&
             res1 <= res5) {
    ans = res1;
    s1 = "GRB";
    ind = 0;
    for (long long int i = 0; i < n; i++) {
      s[i] = s1[ind];
      ind++;
      if (ind > 2) {
        ind = 0;
      }
    }
  } else if (res2 <= res1 && res2 <= res && res2 <= res3 && res2 <= res4 &&
             res2 <= res5) {
    ans = res2;
    s1 = "BGR";
    ind = 0;
    for (long long int i = 0; i < n; i++) {
      s[i] = s1[ind];
      ind++;
      if (ind > 2) {
        ind = 0;
      }
    }
  } else if (res3 <= res1 && res3 <= res2 && res3 <= res && res3 <= res4 &&
             res3 <= res5) {
    ans = res3;
    s1 = "BRG";
    ind = 0;
    for (long long int i = 0; i < n; i++) {
      s[i] = s1[ind];
      ind++;
      if (ind > 2) {
        ind = 0;
      }
    }
  } else if (res4 <= res1 && res4 <= res2 && res4 <= res3 && res4 <= res &&
             res4 <= res5) {
    ans = res4;
    ind = 0;
    s1 = "RBG";
    for (long long int i = 0; i < n; i++) {
      s[i] = s1[ind];
      ind++;
      if (ind > 2) {
        ind = 0;
      }
    }
  } else {
    ans = res5;
    s1 = "GBR";
    ind = 0;
    for (long long int i = 0; i < n; i++) {
      s[i] = s1[ind];
      ind++;
      if (ind > 2) {
        ind = 0;
      }
    }
  }
  cout << ans << endl << s;
}
