#include <stdio.h> int main() { char s[1001]={0}; gets(s); int i=0; int y=0; int k=0; int n=0; int q=0; while(s[i]!='\0') { if(s[i]>='a'&&s[i]<='z') y++; else if(s[i]==' ') k++; else if(s[i]>='0' && s[i]<='9') n++; else q++; i++; } printf("%d\n%d\n%d\n%d",y,k,n,q); return 0; }