- Time limit: 1.00 s
- Memory limit: 512 MB
This is an interactive problem.
There is a secret integer x, 1 \leq x \leq 10^{18}. You may make up to 60 queries. In every query, you give a integer y, 1 \leq y \leq 10^{18}. Then:
- If x < y, the grader outputs "<"
- If x > y, the grader outputs ">"
- If x = y, the grader outputs "=", and you win.
Your goal is to win, that is, to make a query where y = x. After this, it doesn't matter what your program does.
Interaction
To make a query, output the integer y, 1 \leq y \leq 10^{18} in a new line. You need to flush the output stream after this. This can be done with:
std::cout << std::flush; // C++
fflush(stdout); // C-style IO, C / C++
System.out.flush(); // Java
stdout.flush() # Python
After every query, the next line of input contains the answer to the query: A single character, which is either "<", "=" or ">".
Note that the grader is adaptive: that is, it may change the value of x depending on your queries. However, the answers given to all of your previous queries are still valid.
If your program makes 60 queries but doesn't win, you will get the "Wrong Answer" verdict.
Constraints
- 1 \leq x \leq 10^{18}
- You may make at most 60 queries, including the final one.
Example Interaction
out: 10 in: < out: 3 in: > out: 4 in: > out: 8 in: > out: 9 in: =