import java.util.Scanner; public class GetNumDifChar { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); int isLetter = 0; int isSpace = 0; int isDigit = 0; int isOther = 0; for (int i = 0; i < str.length(); i++) { if(Character.isLetter(str.charAt(i))) isLetter++; else if(Character.isSpace(str.charAt(i))) isSpace++; else if(Character.isDigit(str.charAt(i))) isDigit++; else isOther++; } System.out.println(isLetter); System.out.println(isSpace); System.out.println(isDigit); System.out.println(isOther); } }