Cellphones have become an essential part of everyone's life. In addition to making voice calls, cell phones can be used to send text messages, which are known as SMS for short. Unlike computer keyboards, most cell phones have limited number of keys. To accommodate all alphabets, letters are compacted into single key. Therefore, to type certain characters, a key must be repeatedly pressed until that character is shown on the display panel.
The keboard looks like...
---------------------------------
| | abc | def |
---------------------------------
| ghi | jkl | mno |
---------------------------------
| prqs | tuv | wxyz |
--------------------------------
| | <SP> | |
--------------------------------
In the above grid each cell represents one key. Here <SP> means a space. In order to type the letter ‘a’, we must press that key once, however to type ‘b’ the same key must be repeatedly pressed twice and for ‘c’ three times. In the same manner, one key press for ‘d’, two for ‘e’ and three for ‘f’. This is also applicable for the remaining keys and letters. Note that it takes a single press to type a space.
Bill a student of IIIT Kota is given a task to type one among many sentences in a SMS. He want to know that how much key presses he need to press for each sentence and want to know that for which sentence he need the least key presses.
INPUT
The first line of input will be a positive integer N where N denotes the number of sentences. N lines will then follow each containing only spaces and lower case letters. Each line will contain at least 1 and at most 100 characters.
OUTPUT
The only line of the output will contain the required sentence number and number of key strokes required to type it.
Look at the sample output for the exact format.
Sample Input
3welcome to iiit kota
good luck and have fun
i love u
Sample Output
#3 18