import java.util.*;
import java.io.*;

public class WordStat
{
	public static void main(String[] args) throws Exception
	{
		Scanner input = new Scanner(System.in);
		PrintStream output = System.out;
		
		Scanner file = new Scanner(new File("book.txt"));
		Map<String, Integer> map = new TreeMap<String, Integer>();
		while (file.hasNextLine())
		{
			String line = file.nextLine();
			StringTokenizer stk = new StringTokenizer(line, " .;,?!");
			while (stk.hasMoreTokens())
			{
				String word = stk.nextToken().toUpperCase();
				Integer count = map.get(word);
				if (count == null)
				{
					map.put(word, 1);
				} else
				{
					count++;
					map.put(word, count);
				}
			}
		}
		output.println(map);
	}
}