| Kotlin Heroes: Episode 12 |
|---|
| Finished |
This is an interactive problem.
In a certain database, there are $$$n$$$ handles stored in the form of a numbered list. You are interested in one specific handle $$$h$$$, or more precisely, in its position in this list.
You can ask the database for the position $$$i$$$ from the list, and it will return the handle at the $$$i$$$-th position.
All handles are non-empty strings consisting of at most $$$20$$$ lowercase Latin letters, except the first one that can be either a lowercase or an uppercase Latin letter.
You know that all handles are sorted in lexicographical order, but the problem is that it is unknown whether uppercase letters are considered less than lowercase ones. In other words, you do not know if it is true that all handles starting with uppercase letters come first, followed by those starting with lowercase letters — or vice versa, that all handles starting with lowercase letters come first, followed by those starting with uppercase letters.
Lexicographical order is the order of standard string comparison, formally defined as follows:
Due to restricted access to the database, you can make no more than $$$10$$$ queries to it. Determine the position of the handle you are interested in, knowing that it is definitely in the list.
The first line contains the number $$$n$$$ and the string $$$h$$$ ($$$1 \le n \le 500$$$) — the total number of handles in the list and the handle you are searching for.
It is guaranteed that all handles are non-empty strings of no more than $$$20$$$ characters, consisting only of lowercase Latin letters, except the first letter that may be an uppercase letter.
It is also guaranteed that all handles are sorted, unique, and the given handle is in the list.
To ask a question, output a string in the following format (without quotes):
The jury will return a string $$$s$$$ — the handle at the $$$i$$$-th position in the list.
When you are ready to print the answer, output a single string in the following format (without quotes):
The interactor is not adaptive, which means that the list of handles in each test is fixed beforehand.
If your program asks more than $$$10$$$ queries (excluding printing the answer) or violates the format of the queries, the jury will respond with the string "-1". In this case, your program should terminate immediately to receive a verdict of Wrong Answer. Otherwise, you may receive an arbitrary verdict because your solution will continue to read from a closed stream.
After printing a query, do not forget to output a newline and flush the output. Otherwise, you may receive a verdict of Idleness limit exceeded. To do this, use System.out.flush().
4 adedalic Bleddest Neon adedalic awoo
? 1 ? 2 ? 3 ? 4 ! 3
6 tourist jiangly tourist Radewoosh
? 1 ? 3 ? 6 ! 3
Note that spaces in examples are added only for improved readability. When checking solutions, the interactor will not output any empty lines.
| Name |
|---|


