import java.util.Scanner;

public class Arrays {

	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);
		System.out.println("Enter the phrase ");
		String phrase = input.nextLine();

		int upperCase = 0;
		int lowerCase = 0;
		int otherLetter = 0;
		int ascii = 0;
		char letter;

		for (int i = 0; i < phrase.length(); i++) {
			letter = phrase.charAt(i);
			ascii = letter;

			if (ascii >= 65 && ascii <= 90) {
				upperCase++;
			} else if (ascii >= 97 && ascii <= 122) {
				lowerCase++;
			} else
				otherLetter++;
			// }else if (ascii >=32 && ascii <=64 || ascii >=91 && ascii <=96 ||
			// ascii >=123 && ascii <=126){
			// otherLetter++;
			// }
		}

		System.out.println("The total number of letters is " + phrase.length());
		System.out.println("The number of uppercase letters is " + upperCase);
		System.out.println("The number of lowercase letters is " + lowerCase);
		System.out.println("The number of other letters is " + otherLetter);
	}
}
