#include <stdio.h>
int main(void) {
// your code goes here
int i, count;
char prev,text[101] = {0};
prev = text[0];
if(prev == NULL)
{
}
else
{
for(i = 0;text[i] != NULL;i++)
{
if(text[i] < 'a' || text[i] > 'z')
return 0;
}
count = 1;
for(i = 1;text[i] != NULL;i++)
{
if(prev == text[i])
{
count++;
}
else
{
if(count > 1)
count = 1;
prev = text[i];
}
}
if(count > 1)
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglpbnQgaSwgY291bnQ7CgljaGFyIHByZXYsdGV4dFsxMDFdID0gezB9OwoJCglzY2FuZigiJXMiLHRleHQpOwoJCglwcmV2ID0gdGV4dFswXTsKCWlmKHByZXYgPT0gTlVMTCkKCXsKCQlwcmludGYoIjBcbiIpOwoJfQoJZWxzZQoJewoJCWZvcihpID0gMDt0ZXh0W2ldICE9IE5VTEw7aSsrKQoJCXsKCQkJaWYodGV4dFtpXSA8ICdhJyB8fCB0ZXh0W2ldID4gJ3onKQoJCQkJcmV0dXJuIDA7CgkJfQoJCWNvdW50ID0gMTsKCQoJCWZvcihpID0gMTt0ZXh0W2ldICE9IE5VTEw7aSsrKQoJCXsKCQkJaWYocHJldiA9PSB0ZXh0W2ldKQoJCQl7CgkJCQljb3VudCsrOwoJCQl9CgkJCWVsc2UKCQkJewoJCQkJcHJpbnRmKCIlYyIsIHByZXYpOwoJCQkJaWYoY291bnQgPiAxKQoJCQkJCXByaW50ZigiJWQiLGNvdW50KTsKCQkJCWNvdW50ID0gMTsKCQkJCXByZXYgPSB0ZXh0W2ldOwoJCQl9CgkJfQoJCXByaW50ZigiJWMiLCBwcmV2KTsKCQlpZihjb3VudCA+IDEpCgkJCXByaW50ZigiJWQiLGNvdW50KTsKCQlwcmludGYoIlxuIik7Cgl9CglyZXR1cm4gMDsKfQo=