#include <bits/stdc++.h>   using namespace std;   int a[200000 + 5], b[10][200000 + 5];   int main() {     int n, i;     cin >> n;     char c;     c = getchar();     for (i = 1; i <= n; i++) {       c = getchar();       if (c ==  R ) a[i] = 1;       if (c ==  G ) a[i] = 2;       if (c ==  B ) a[i] = 3;     }     b[1][1] = 1;     b[1][2] = 2;     for (i = 3; i <= n; i++) b[1][i] = 6 - b[1][i - 1] - b[1][i - 2];     for (i = 1; i <= n; i++)       if (b[1][i] != a[i]) b[1][0]++;     b[2][1] = 1;     b[2][2] = 3;     for (i = 3; i <= n; i++) b[2][i] = 6 - b[2][i - 1] - b[2][i - 2];     for (i = 1; i <= n; i++)       if (b[2][i] != a[i]) b[2][0]++;     b[3][1] = 2;     b[3][2] = 1;     for (i = 3; i <= n; i++) b[3][i] = 6 - b[3][i - 1] - b[3][i - 2];     for (i = 1; i <= n; i++)       if (b[3][i] != a[i]) b[3][0]++;     b[4][1] = 2;     b[4][2] = 3;     for (i = 3; i <= n; i++) b[4][i] = 6 - b[4][i - 1] - b[4][i - 2];     for (i = 1; i <= n; i++)       if (b[4][i] != a[i]) b[4][0]++;     b[5][1] = 3;     b[5][2] = 1;     for (i = 3; i <= n; i++) b[5][i] = 6 - b[5][i - 1] - b[5][i - 2];     for (i = 1; i <= n; i++)       if (b[5][i] != a[i]) b[5][0]++;     b[6][1] = 3;     b[6][2] = 2;     for (i = 3; i <= n; i++) b[6][i] = 6 - b[6][i - 1] - b[6][i - 2];     for (i = 1; i <= n; i++)       if (b[6][i] != a[i]) b[6][0]++;     int x = 1;     for (i = 1; i <= 6; i++)       if (b[i][0] < b[x][0]) x = i;     cout << b[x][0] << endl;     for (i = 1; i <= n; i++) {       if (b[x][i] == 1) cout <<  R ;       if (b[x][i] == 2) cout <<  G ;       if (b[x][i] == 3) cout <<  B ;     }     return 0;   }   