|
<p> Jack is blessed with a baby and he and his wife want to name their child. Jack is a mathematician and his wife is very superstitious. She wants the baby's name to contain at least one of her ancestors names as a substring. They have decided that the baby's name should be exactly <strong>L</strong> characters long, and will only consist of lowercase characters. Jack's wife gives Jack a list of <strong>N</strong> strings, the names of her ancestors. Jack finds all the name possible names for his baby and lists them in alphabetical order. He asks you to choose the <strong>K</strong>th (1-based) name in the list as the name for his child. |
|
</p> |
|
<p> |
|
<h2 id="input">Input</h2> |
|
The first line contains <strong>T</strong>, the number of test cases. |
|
Each test case begins with the value of <strong>L</strong> followed by a single integer <strong>K</strong>. |
|
The next line contains a single integer <strong>N</strong> followed by <strong>N</strong> lines, each containing the name of one of the wife's ancestors. |
|
</p> |
|
|
|
<p> |
|
<h2 id="output">Output</h2> |
|
For every test case output the name for the child. If no such name exists print "unnamed baby :(". |
|
</p> |
|
|
|
<p> |
|
<h2>Constraints</h2> |
|
1 ≤ <strong>T</strong> ≤ 20 <br/> |
|
1 ≤ <strong>L</strong> ≤ 100 <br/> |
|
1 ≤ <strong>N</strong> ≤ 100 <br> |
|
1 ≤ length of each string in the list ≤ 100 <br/> |
|
1 ≤ <strong>K</strong> ≤ 10<sup>18</sup><br/> |
|
</p> |
|
|