Peter's parents have asked him to put up decorations around his house for Halloween. So, Peter decides to print out some of his favorite words from a list of spooky words and tape them to the walls.
However, Peter has discovered that the public printer he uses charges less money to print shorter words. The printer considers a word to be shorter than another if it has a smaller length or if they have the same length and it is smaller lexicographically.
Peter wants to be charged as little as possible for his word choices while still keeping the words diverse. To decide which words to use, he will ask you questions, where the th question asks for the th shortest word in the list.
Please help Peter with his Halloween decorations by finding the words that he asks for.
Input Specification
The first line will contain two space-separated integers, and .
The next lines will each contain a string composed of only lowercase English letters, representing the th word in Peter's list.
The next lines will each contain a single integer , representing the th question Peter asks.
Output Specification
Output lines containing the answers to Peter's questions.
Sample Input
3 2
boo
witch
ghost
1
2
Sample Output
boo
ghost
Comments