IntermediateLists & Dictionaries25 points

Most common words in customer feedback

A product team reads hundreds of feedback comments. To spot the themes, they want the most frequent words.

Task: the first line holds an integer n, the next n lines are comments. Count the words (ignore upper/lower case, and treat the characters . , ! ? as separators). Print the 3 most common words, one per line, as word count. If two words have the same count, the one that comes first alphabetically goes first.

Sample test

Input

3
Great product, fast delivery!
Fast delivery and great price.
Delivery was late, product is great

Expected output

delivery 3
great 3
fast 2

Your answer is also checked against 2 hidden tests.