import java.util.Scanner;
public class Main {
/*
输入一行字符,分别统计出包含英文字母、空格、数字和其它字符的个数。
输入一行字符串,可以有空格
输入:1qazxsw23 edcvfr45tgbn hy67uj m,ki89ol.\\/;p0-=\\][
输出:
26
3
10
12
*/
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String str = in.nextLine();
int letter = 0;
int space = 0;
int digit = 0;
int others = 0;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if(Character.isLetter(c)){
letter++;
}else if(Character.isSpaceChar(c)){
space++;
}else if(Character.isDigit(c)){
digit++;
}else{
others++;
}
}
System.out.println(letter+"\n"+space+"\n"+digit+"\n"+others);
}
}
public class Main {
/*
输入一行字符,分别统计出包含英文字母、空格、数字和其它字符的个数。
输入一行字符串,可以有空格
输入:1qazxsw23 edcvfr45tgbn hy67uj m,ki89ol.\\/;p0-=\\][
输出:
26
3
10
12
*/
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String str = in.nextLine();
int letter = 0;
int space = 0;
int digit = 0;
int others = 0;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if(Character.isLetter(c)){
letter++;
}else if(Character.isSpaceChar(c)){
space++;
}else if(Character.isDigit(c)){
digit++;
}else{
others++;
}
}
System.out.println(letter+"\n"+space+"\n"+digit+"\n"+others);
}
}