#include "stdio.h"
main()
{char c,sum1=0,sum2=0,space=0,number=0,other=0;
c=getchar();
while(c!='\n')
{
if(c>='A'&&c<='Z') sum1++;
else if(c>='a'&&c<='z') sum2++;
else if(c>='0'&&c<='9') number++;
else if(c==' ') space++;
else other ++;
c=getchar();
}
printf("%d,%d,%d,%d,%d",sum1,sum2,space,number,other);
}