#include<stdio.h>
void main()
{
char s[100];
int i,up=0,low=0,sp=0,digit=0,other=0;
gets(s);
for(i=0;s[i];i++)
if(s[i]>='A'&&s[i]<='Z')up++;
else if(s[i]>='a'&&s[i]<='z')low++;
else if(s[i]>='0'&&s[i]<='9')digit++;
else if(s[i]==' ')sp++;
else other++;
printf("up=%d\nlow=%d\nsp=%d\ndigit=%d\nother=%d\n",up,low,sp,digit,other);
}