#P1245. 电话号码
电话号码
Description
On a telephone keypad, several English letters are written under each digit. The mapping is as follows:
- .
- .
- .
- .
- .
- .
- .
- .
- .
Now, given a word list and a sequence of digits (a numeric code), please translate the code using words from the list.
Input Format
The first line contains a positive integer indicating the number of words in the list .
The second line contains a digit string of length at most , representing the code.
The next lines each contain one word of length at most , representing the word list.
Output Format
Output a single line: the decoded original text. If the code cannot be translated, output No Solutions!. If there are multiple valid translations, output any one of them.
8
73373711664
thi
shs
this
is
b
a
boo
k
thi shs b boo k
Hint
SPJ provided by @zhouyonglong.
Translated by ChatGPT 5
京公网安备 11011102002149号