import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class test2 {
public static void main(String[] args) throws IOException {
BufferedReader bufr =new BufferedReader(new InputStreamReader(System.in));
String ss =bufr.readLine();
char[] chs= ss.toCharArray();
int a=0,b=0,c=0,d=0;
for(int i=0;i<chs.length;i++)
{
if(chs[i]>='0' && chs[i]<='9')
a++;
else if((chs[i]>='a' &&chs[i]<='z' )||(chs[i]>='A' &&chs[i]<='Z'))
b++;
else if(chs[i]==' ')
c++;
else
d++;
}
System.out.println("输入的字符串中共有数字"+a+"个");
System.out.println("输入的字符串中共有字母"+b+"个");
System.out.println("输入的字符串中共有空格"+c+"个");
System.out.println("输入的字符串中共有其他字符"+d+"个");
}
}