#include #include #include #include #include using namespace std; int nn,num; int main(){ char str[100]; int i; while(~scanf("%s",str)){ nn = 0; bool flag = true; int len = strlen(str); char tmp,a = 0,b = 0,c = 0; tmp = str[0]; a = tmp; for(i =0;i < len;i++){ if(tmp==str[i]){ nn++; } else { tmp = str[i]; b = tmp; break; } } if(nn*3!=len) flag = false; for(int k = i;i