Businesses like memorable telephone numbers. One way to make a number memorable is to have it spell a word or phrase. For example, you can reach one university by dialing TUT-GLOP, and you can order a pizza by dialing 310-GINO. Sometimes only part of the number spells a word. Another way to make a number memorable is to group its digits, such as the "three tens" number 3-10-10-10.
The standard form of a telephone number is seven decimal digits with a hyphen between the third and fourth digits (for example, 888-1200). A phone keypad maps letters to digits as follows:
There is no mapping for the letters Q or Z. Hyphens are not dialed and may be added or removed freely. In standard form, TUT-GLOP is 888-4567, 310-GINO is 310-4466, and 3-10-10-10 is 310-1010.
Two telephone numbers are equivalent if they have the same standard form, because they dial the same number.
You are compiling a directory of telephone numbers from local businesses. As a quality check, you want to find every number that is listed more than once (in any form).
The first line contains a positive integer, the number of telephone numbers in the directory (up to $100{,}000$).
Each of the following lines contains one telephone number: a string of decimal digits, uppercase letters (never Q or Z), and hyphens. Exactly seven of the characters in each string are digits or letters.
For each telephone number that appears more than once in any form, print a line containing the number in standard form, a single space, and the number of times it appears in the directory.
Sort the output lines by telephone number in ascending lexicographical order. If no number appears more than once, print a single line: No duplicates.