B. All Your Base
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

This is an interactive problem. You must flush the output after printing each line. For example, in C++ use fflush(stdout), in Java — System.out.flush(), and in Python — sys.stdout.flush().

You have to find a hidden integer $$$X$$$ $$$(1 \le X \le 10^{15})$$$ using an interactive system.

Let the representation of $$$X$$$ in base $$$n$$$ be: $$$ X = d_k n^k + d_{k-1} n^{k-1} + \dots + d_1 n^1 + d_0 n^0 $$$, where $$$0 \le d_i \lt n$$$ for all $$$i$$$.

You may ask questions. In each question, you provide an integer base $$$n$$$ $$$(2 \le n \le 100)$$$ and a boolean value $$$b \in \{0, 1\}$$$.

The system will return:

  • If $$$b = 0$$$, the sum of digits at even positions in the base $$$n$$$ representation of $$$X$$$: $$$\sum d_{2i}$$$ for $$$i \in \{0, 1, 2, \dots\}$$$.
  • If $$$b = 1$$$, the sum of digits at odd positions in the base $$$n$$$ representation of $$$X$$$: $$$\sum d_{2i+1}$$$ for $$$i \in \{0, 1, 2, \dots\}$$$.

After at most $$$10$$$ questions, you have to output the value of $$$X$$$.

All numbers are in base 10 unless otherwise specified.

Input

The first line contains an integer $$$t$$$ $$$(1 \le t \le 10^4)$$$, the number of test cases.

After reading the input for each test case, proceed with the interaction as described.

Interaction

To ask a question, print a line in the format "? $$$n$$$ $$$b$$$" (without quotes), where $$$n$$$ is the base and $$$b$$$ is the boolean value. After each query, read an integer $$$S$$$ — the sum of digits returned by the system.

When you are ready to provide the answer, print a line in the format "! $$$X$$$" (without quotes), where $$$X$$$ is the hidden integer.

Your program can ask at most $$$10$$$ questions. Note that the final line "! $$$X$$$" is not counted as a question.

Example
Input
3

1

2


0


9

8
Output

? 2 0

? 3 1

! 16
? 5 0

! 5
? 8 0

? 8 1

! 2026
Note

For the third test case, the hidden integer is $$$2026$$$.

The interaction proceeds as follows:

ParticipantJuryExplanation
? 8 09$$$2026 = 3752_8$$$. Even positions (0, 2) contain digits $$$2, 7$$$ — so the sum is $$$9$$$.
? 8 18$$$2026 = 3752_8$$$. Odd positions (1, 3) contain digits $$$5, 3$$$ — so the sum is $$$8$$$.
! 2026The correct value of $$$X$$$ is reported.