func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int i, l, skg = 0, skr = 0, sky = 0, skb = 0, kr = 0, kg = 0, kb = 0, ky = 0,               pg = 0, pr = 0, py = 0, pb = 0;     char s[120], r[4];     scanf( %s , s);     l = strlen(s);     if (l % 4 == 0) {       for (i = 0; i < l; i += 4) {         kg = 0;         kb = 0;         ky = 0;         kr = 0;         if (s[i] ==  G  || s[i + 1] ==  G  || s[i + 2] ==  G  || s[i + 3] ==  G )           kg++;         if (s[i] ==  B  || s[i + 1] ==  B  || s[i + 2] ==  B  || s[i + 3] ==  B )           kb++;         if (s[i] ==  Y  || s[i + 1] ==  Y  || s[i + 2] ==  Y  || s[i + 3] ==  Y )           ky++;         if (s[i] ==  R  || s[i + 1] ==  R  || s[i + 2] ==  R  || s[i + 3] ==  R )           kr++;         if (kg == 0) skg++;         if (kb == 0) skb++;         if (ky == 0) sky++;         if (kr == 0) skr++;       }       printf( %d %d %d %d , skr, skb, sky, skg);       return 0;     } else {       for (i = 0; i < l; i++) {         if (s[i] ==  G ) {           pg = i + 1;           if (pg > 4) {             pg = pg % 4;             if (pg == 0) pg = 4;           }         }         if (s[i] ==  Y ) {           py = i + 1;           if (py > 4) {             py = py % 4;             if (py == 0) py = 4;           }         }         if (s[i] ==  R ) {           pr = i + 1;           if (pr > 4) {             pr = pr % 4;             if (pr == 0) pr = 4;           }         }         if (s[i] ==  B ) {           pb = i + 1;           if (pb > 4) {             pb = pb % 4;             if (pb == 0) pb = 4;           }         }       }       if (pg == 0) {         for (i = 1; i <= 4; i++) {           if (pr != i && py != i && pb != i) {             pg = i;             break;           }         }       }       if (pb == 0) {         for (i = 1; i <= 4; i++) {           if (pr != i && py != i && pg != i) {             pb = i;             break;           }         }       }       if (pr == 0) {         for (i = 1; i <= 4; i++) {           if (pg != i && py != i && pb != i) {             pr = i;             break;           }         }       }       if (py == 0) {         for (i = 1; i <= 4; i++) {           if (pr != i && pg != i && pb != i) {             py = i;             break;           }         }       }       for (i = 0; i < (l / 4) * 4; i += 4) {         kg = 0;         kb = 0;         ky = 0;         kr = 0;         if (s[i] ==  G  || s[i + 1] ==  G  || s[i + 2] ==  G  || s[i + 3] ==  G )           kg++;         if (s[i] ==  B  || s[i + 1] ==  B  || s[i + 2] ==  B  || s[i + 3] ==  B )           kb++;         if (s[i] ==  Y  || s[i + 1] ==  Y  || s[i + 2] ==  Y  || s[i + 3] ==  Y )           ky++;         if (s[i] ==  R  || s[i + 1] ==  R  || s[i + 2] ==  R  || s[i + 3] ==  R )           kr++;         if (kg == 0) skg++;         if (kb == 0) skb++;         if (ky == 0) sky++;         if (kr == 0) skr++;       }       for (i = (l / 4) * 4; i < (l / 4) * 4 + l % 4; i++) {         if (s[i] ==  ! ) {           if ((i - (l / 4) * 4) + 1 == pg) skg++;           if ((i - (l / 4) * 4) + 1 == py) sky++;           if ((i - (l / 4) * 4) + 1 == pr) skr++;           if ((i - (l / 4) * 4) + 1 == pb) skb++;         }       }       printf( %d %d %d %d , skr, skb, sky, skg);       return 0;     }   }   