void main() { char s[80]; int i, n1 = 0, n2 = 0, n3 = 0, n4 = 0; gets(s); for(i=0; s[i] != '\0'; i ++) { if(s[i] >= 'a' && s[i] <= 'z' || s[i] >= 'A' && s[i] <= 'Z') n1 += 1; else if(s[i] >= '0' && s[i] <= '9') n2 += 1; else if(s[i] == ' ') n3 += 1; else n4 += 1; } printf("aphla %d,digit %d,blank %d,other %d\n", n1, n2, n3, n4); }