Problem Description

Given n words, group them by first letter (a-z) and print counts per letter present in sorted order.

Input Format

First n. Next line n words.

Output Format

Lines: letter count.

Sample Test Case

Input:
6 apple ant ball bat cat car
Output:
a 2 b 2 c 2

Constraints

n

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next