#include <bits/stdc++.h>
using namespace std;
int vis[1001][1001];
int n, m;
string dir = "ULDR";
string ps1;
char a[1001][1001];
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int tx, ty;
map<pair<int, int>, string> st;
string ans = "";
bool isValid(int x, int y) {
  if (x < 1 || y < 1 || x > n || y > m || a[x][y] == '#') return false;
  return true;
}
void dfs(int sx, int sy, string ps) {
  vis[sx][sy] = 1;
  for (int k = 0; k < 4; k++) {
    if (isValid(sx + dx[k], sy + dy[k]) && vis[sx + dx[k]][sy + dy[k]] == 0) {
      tx = sx + dx[k];
      ty = sy + dy[k];
      ps1 = ps;
      for (int i = 0; i < 4; i++) {
        if (isValid(tx + dx[i], ty + dy[i]) &&
            vis[tx + dx[i]][ty + dy[i]] == 1) {
          if (st[{tx + dx[i], ty + dy[i]}].size() < ps1.size() + 1) {
            ps1 = st[{tx + dx[i], ty + dy[i]}];
            ps1 += dir[i];
          }
        }
      }
      st[{sx + dx[k], sy + dy[k]}] = ps1;
      dfs(sx + dx[k], sy + dy[k], ps1);
    }
  }
}
bool isPalindrome(string s) {
  if (s.size() == 1) return false;
  for (int i = 0; i < s.size() / 2; i++) {
    if (s[i] != s[s.size() - 1 - i]) {
      return false;
    }
  }
  return true;
}
bool isPrime(long long int n) {
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
long long int fact(long long int n) {
  if (n == 1)
    return 1;
  else
    return n * fact(n - 1);
}
long long int comb(long long int n, long long int r) {
  return fact(n) / (fact(n - r) * fact(r));
}
long long int gp(int x, int y, int n, int m) {
  if (x == n || y == m)
    return 1;
  else
    return gp(x + 1, y, n, m) + gp(x, y + 1, n, m);
}
bool val(int n) {
  if (n == 2 || n == 4 || n == 16) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t-- > 0) {
    string s[] = {"RBG", "RGB", "BRG", "BGR", "GRB", "GBR"};
    int n;
    cin >> n;
    string ans1;
    string s1;
    cin >> s1;
    int ans = n;
    int c = 0;
    string ans2 = "";
    for (int i = 0; i < 6; i++) {
      ans2 = "";
      c = 0;
      for (int j = 0; j < s1.size(); j++) {
        if (s1[j] != s[i][j % 3]) c++;
        ans2 += s[i][j % 3];
      }
      if (c <= ans) {
        ans = c;
        ans1 = ans2;
      }
    }
    cout << ans << endl;
    cout << ans1 << endl;
  }
  return 0;
}
