#include <stdio.h> int main() { char a; int b, c, d, e; b = c = d = e = 0; a = getchar(); while(a!='\n') { if (a >= 'a' && a <= 'z' || a >= 'A' && a < 'Z') b++; else if (a >= 0 && a <= 9) c++; else if (a == ' ') d++; else e++; a = getchar();

}
printf("%d %d %d %d", b, c, d, e);

return 0;

}