#include <bits/stdc++.h>
using namespace std;
const long long Mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  string arr[6];
  int mn = Mod;
  int a = 0;
  for (int j = 0; j < n; j++) {
    if (j % 3 == 0) {
      if (s[j] != 'R') {
        a++;
      }
    } else if (j % 3 == 1) {
      if (s[j] != 'G') a++;
    } else {
      if (s[j] != 'B') a++;
    }
  }
  mn = min(a, mn);
  int b = 0;
  for (int j = 0; j < n; j++) {
    if (j % 3 == 0) {
      if (s[j] != 'R') b++;
    } else if (j % 3 == 1) {
      if (s[j] != 'B') b++;
    } else {
      if (s[j] != 'G') b++;
    }
  }
  mn = min(b, mn);
  int c = 0;
  for (int j = 0; j < n; j++) {
    if (j % 3 == 0) {
      if (s[j] != 'B') c++;
    } else if (j % 3 == 1) {
      if (s[j] != 'R') c++;
    } else {
      if (s[j] != 'G') c++;
    }
  }
  mn = min(c, mn);
  int d = 0;
  for (int j = 0; j < n; j++) {
    if (j % 3 == 0) {
      if (s[j] != 'B') d++;
    } else if (j % 3 == 1) {
      if (s[j] != 'G') d++;
    } else {
      if (s[j] != 'R') d++;
    }
  }
  mn = min(d, mn);
  int e = 0;
  for (int j = 0; j < n; j++) {
    if (j % 3 == 0) {
      if (s[j] != 'G') e++;
    } else if (j % 3 == 1) {
      if (s[j] != 'R') e++;
    } else {
      if (s[j] != 'B') e++;
    }
  }
  mn = min(e, mn);
  int f = 0;
  for (int j = 0; j < n; j++) {
    if (j % 3 == 0) {
      if (s[j] != 'G') f++;
    } else if (j % 3 == 1) {
      if (s[j] != 'B') f++;
    } else {
      if (s[j] != 'R') f++;
    }
  }
  mn = min(f, mn);
  cout << mn << endl;
  if (mn == a) {
    for (int j = 0; j < n; j++) {
      if (j % 3 == 0)
        cout << "R";
      else if (j % 3 == 1)
        cout << "G";
      else
        cout << "B";
    }
  } else if (mn == b) {
    for (int j = 0; j < n; j++) {
      if (j % 3 == 0)
        cout << "R";
      else if (j % 3 == 1)
        cout << "B";
      else
        cout << "G";
    }
  } else if (mn == c) {
    for (int j = 0; j < n; j++) {
      if (j % 3 == 0)
        cout << "B";
      else if (j % 3 == 1)
        cout << "R";
      else
        cout << "G";
    }
  } else if (mn == d) {
    for (int j = 0; j < n; j++) {
      if (j % 3 == 0)
        cout << "B";
      else if (j % 3 == 1)
        cout << "G";
      else
        cout << "R";
    }
  } else if (mn == e) {
    for (int j = 0; j < n; j++) {
      if (j % 3 == 0)
        cout << "G";
      else if (j % 3 == 1)
        cout << "R";
      else
        cout << "B";
    }
  } else {
    for (int j = 0; j < n; j++) {
      if (j % 3 == 0)
        cout << "G";
      else if (j % 3 == 1)
        cout << "B";
      else
        cout << "R";
    }
  }
  cout << endl;
  return 0;
}
