Snow Calls

No attempts yetTime limit1sMemory limit128 MB

Problem

You have been snowed in at your summer home, and without the Internet! That means the phone is your only way to get what you need to survive: pizza, pop, and the latest video games.

Companies often replace the digits in their phone numbers with letters to make them more memorable. After all, 416-BUY-MORE is easier to remember than 416-289-6673. Some numbers even carry extra letters or digits (such as 604-PIZZABOX), but any digit beyond the 10th is irrelevant.

Doing the conversion by hand is tedious, so write a program that rewrites every phone number in your phone book into the form xxx-xxx-xxxx. Use the telephone keypad below to turn each letter into a digit, copy digits unchanged, ignore the hyphens, and keep only the first 10 digits.

DigitLetters
2A B C
3D E F
4G H I
5J K L
6M N O
7P Q R S
8T U V
9W X Y Z

Input

The first line contains an integer $t$, the number of test cases. Each of the following $t$ lines contains one valid phone number made of alphanumeric characters separated by hyphens. No line is longer than 40 characters.

Output

For each test case, print the phone number in the form xxx-xxx-xxxx on its own line.