Problem Description

Input has n lines. Some lines look like ERROR:CODE where CODE is a word. Count each code and print in descending count, tie by code. Ignore lines that do not match.

Input Format

Line1: n. Next n lines text.

Output Format

Multiple lines: CODE count.

Sample Test Case

Input:
6 ERROR:DB hello ERROR:DB ERROR:AUTH ERROR:AUTH ERROR:DB
Output:
DB 3 AUTH 2

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next