// Arup Guha
// 7/7/2011
// Example illustrating String methods: Lists the frequency of each letter in a string, without arrays.

import java.util.*;

public class LetterFreq {
	
	
	public static void main(String[] args) {
		
		Scanner stdin = new Scanner(System.in);
		
		System.out.println("Please enter a sentence.");
		
		// Read in the whole line and change it to lower case.
		String line = stdin.nextLine();
		line = line.toLowerCase();
		
		for (char c = 'a'; c <= 'z'; c++) {
			
			// Reset our counter.
			int count = 0;
			
			// Go through each letter in the string, tallying up occurrences of c.
			for (int i=0; i<line.length(); i++)
				if (line.charAt(i) == c)
					count++;	
						
			// Output the result for this letter.
			System.out.println("The letter "+c+" occurred "+count+" number of times.");
		}
		
	}
}