QWERTY03 - JAVA COUNTING

no tags 

You are given a list of characters in English alphabets (ASCII ≥ 97). Sort the characters and give the number of occurrences of every character.

Input

The first line contains an integer n, the number of characters, followed by n lines with a character in every line.

Output

Print the characters in sorted order with no duplicates.

Output format: “character number_of_occurrences”

Constraints

1 ≤ n ≤ 100

Example

Input:
5
a
f
b
a
f

Output:
a 2
b 1
f 2


Added by:cegprakash
Date:2012-01-09
Time limit:1s
Source limit:500B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:JAVA