ACM Practice Problem: Pets

Bob is one of those people that really likes pets. He lives out in the country and has a huge farm literally filled with animals. From time to time people will come to visit him and ask him how many pets he has of a certain type (for instance, how many dogs). While Bob has a complete listing of the pets by name, he doesn't really keep track of them. Further, although he never forgets a pet when he lists them off, he may ocassionally repeat one.

Your task is to read in the list of his pets, their type (dog, cat, horse, etc), and produce a summary of the total count exactly as shown below.

Sample Input

bear Fuzzy Wuzzy
dog Rover
dog Spot
horse Patches
cat Spot
cat Mittens
dog Rover

Sample Output

bear: 1
cat: 2
dog: 2
horse: 1

total: 6