#include <iostream>
#include <cctype>
int main()
{
char input , last;
int letters = 0 , numbers = 0 , characters = 0 , repeats = 0;
while( std::cin >> input && repeats != 3 )
{
++characters;
if( isalpha(input) ) ++letters;
if( isdigit(input) ) ++numbers;
if( characters == 1 ) //First time so you have to set initial value for last char
last = input;
if( last == input )
++repeats;
else
repeats = 1;
}
std::cout << "Characters: " << characters << std::endl;
std::cout << "Letters: " << letters << std::endl;
std::cout << "Numbers: " << numbers << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y2N0eXBlPgppbnQgbWFpbigpCnsKCWNoYXIgaW5wdXQgLCBsYXN0OwoJaW50IGxldHRlcnMgPSAwICwgbnVtYmVycyA9IDAgLCBjaGFyYWN0ZXJzID0gMCAsIHJlcGVhdHMgPSAwOwoJCgl3aGlsZSggc3RkOjpjaW4gPj4gaW5wdXQgJiYgcmVwZWF0cyAhPSAzICkKCXsKICAgIAkrK2NoYXJhY3RlcnM7CiAgICAJaWYoIGlzYWxwaGEoaW5wdXQpICkgKytsZXR0ZXJzOyAKCSAJaWYoIGlzZGlnaXQoaW5wdXQpICkgICsrbnVtYmVyczsKCSAJCiAgICAJaWYoIGNoYXJhY3RlcnMgPT0gMSApIC8vRmlyc3QgdGltZSBzbyB5b3UgaGF2ZSB0byBzZXQgaW5pdGlhbCB2YWx1ZSBmb3IgbGFzdCBjaGFyCiAgICAJICAgIGxhc3QgPSBpbnB1dDsKICAgIAkgICAgCgkgCWlmKCBsYXN0ID09IGlucHV0ICkKICAgIAkgICAgKytyZXBlYXRzOwoJICAJZWxzZQogICAgCSAgICByZXBlYXRzID0gMTsKCX0KCQoJc3RkOjpjb3V0IDw8ICJDaGFyYWN0ZXJzOiAiIDw8IGNoYXJhY3RlcnMgPDwgc3RkOjplbmRsOwoJc3RkOjpjb3V0IDw8ICJMZXR0ZXJzOiAiIDw8IGxldHRlcnMgPDwgc3RkOjplbmRsOwoJc3RkOjpjb3V0IDw8ICJOdW1iZXJzOiAiIDw8IG51bWJlcnMgPDwgc3RkOjplbmRsOwoJCglyZXR1cm4gMDsKfQ==