import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextLine()){ String str=sc.nextLine(); System.out.println(getEnglishCharCount(str)); System.out.println(getBlankCharCount(str)); System.out.println(getNumberCharCount(str)); System.out.println(getOtherCharCount(str)); } } //英文字符个数 public static int getEnglishCharCount(String str){ char[] ch=str.toCharArray(); int count=0; for(int i=0;i<ch.length;i++){ if((ch[i]>='a' && ch[i]<='z') || (ch[i]>='A' && ch[i]<='Z')){ count++; } } return count; } //空格字符个数 public static int getBlankCharCount(String str){ char[] ch=str.toCharArray(); int count=0; for(int i=0;i<ch.length;i++){ if(ch[i]==' '){ count++; } } return count; } //数字字符个数 public static int getNumberCharCount(String str){ char[] ch=str.toCharArray(); int count=0; for(int i=0;i<ch.length;i++){ if(ch[i]>='0' && ch[i]<='9'){ count++; } } return count; } //其他字符个数 public static int getOtherCharCount(String str){ return str.length()-getEnglishCharCount(str)-getBlankCharCount(str)-getNumberCharCount(str); } }