Problem Description

Read n words. Count how many words start with each first letter. Output results sorted by letter as: letter count each on new line.

Input Format

First line n. Next n lines words.

Output Format

Multiple lines letter count.

Sample Test Case

Input:
5 apple ant bat ball cat
Output:
a 2 b 2 c 1

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next