Problem: Jury picked a polynomial f(x) = a_0 + a_1 ⋅ x + a_2 ⋅ x^2 + ... + a_k ⋅ x^k. k ≤ 10 and all a_i are integer numbers and 0 ≤ a_i < 10^6 + 3. It's guaranteed that there is at least one i such that a_i > 0.

Now jury wants you to find such an integer x_0 that f(x_0) ≡ 0 mod (10^6 + 3) or report that there is not such x_0.

You can ask no more than 50 queries: you ask value x_q and jury tells you value f(x_q) mod (10^6 + 3).

Note that printing the answer doesn't count as a query.

Interaction

To ask a question, print "? x_q" (0 ≤ x_q < 10^6 + 3). The judge will respond with a single integer f(x_q) mod (10^6 + 3). If you ever get a result of −1 (because you printed an invalid query), exit immediately to avoid getting other verdicts.

After printing a query do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use: 

  * fflush(stdout) or cout.flush() in C++; 
  * System.out.flush() in Java; 
  * flush(output) in Pascal; 
  * stdout.flush() in Python; 
  * see documentation for other languages. 



When you are ready to answer, print "! x_0" where x_0 is the answer or -1 if there is no such x_0.

You can ask at most 50 questions per test case.

Hack Format

To hack, use the following format.

The only line should contain 11 integers a_0, a_1, ..., a_{10} (0 ≤ a_i < 10^6 + 3, max_{0 ≤ i ≤ 10}{a_i} > 0) — corresponding coefficients of the polynomial.

Examples

Input


 
1000002

0


Output


? 0

? 1

! 1

Input


 
5

2

1



Output


? 2

? 1

? 0

! -1

Note

The polynomial in the first sample is 1000002 + x^2.

The polynomial in the second sample is 1 + x^2.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long long int powmod(long long int x, long long int y) {
  if (y == 0) return 1LL;
  long long int t = powmod(x, y / 2);
  if (y % 2 == 0) return (t * t) % 1000003;
  return (((x * t) % 1000003) * t) % 1000003;
}
long long inv(long long a, long long b) {
  return 1 < a ? b - inv(b % a, a) * b / a : 1;
}
long long int y[20];
long long int c[20];
pair<long long int, long long int> bc[20][20] = {{{1, 3628800},
                                                  {-11, 725760},
                                                  {11, 30240},
                                                  {-121, 24192},
                                                  {7513, 172800},
                                                  {-8591, 34560},
                                                  {341693, 362880},
                                                  {-84095, 36288},
                                                  {177133, 50400},
                                                  {-7381, 2520},
                                                  {1, 1}},
                                                 {{-1, 362880},
                                                  {1, 6720},
                                                  {-211, 60480},
                                                  {67, 1440},
                                                  {-6709, 17280},
                                                  {6041, 2880},
                                                  {-663941, 90720},
                                                  {79913, 5040},
                                                  {-4861, 252},
                                                  {10, 1}},
                                                 {{1, 80640},
                                                  {-53, 80640},
                                                  {607, 40320},
                                                  {-1123, 5760},
                                                  {18047, 11520},
                                                  {-92771, 11520},
                                                  {264767, 10080},
                                                  {-115923, 2240},
                                                  {6121, 112},
                                                  {-45, 2}},
                                                 {{-1, 30240},
                                                  {13, 7560},
                                                  {-97, 2520},
                                                  {349, 720},
                                                  {-5419, 1440},
                                                  {13349, 720},
                                                  {-433739, 7560},
                                                  {400579, 3780},
                                                  {-6541, 63},
                                                  {40, 1}},
                                                 {{1, 17280},
                                                  {-17, 5760},
                                                  {31, 480},
                                                  {-2281, 2880},
                                                  {34343, 5760},
                                                  {-163313, 5760},
                                                  {728587, 8640},
                                                  {-71689, 480},
                                                  {6751, 48},
                                                  {-105, 2}},
                                                 {{-1, 14400},
                                                  {1, 288},
                                                  {-107, 1440},
                                                  {8, 9},
                                                  {-93773, 14400},
                                                  {43319, 1440},
                                                  {-62549, 720},
                                                  {1197, 8},
                                                  {-6877, 50},
                                                  {252, 5}},
                                                 {{1, 17280},
                                                  {-49, 17280},
                                                  {19, 320},
                                                  {-1999, 2880},
                                                  {28603, 5760},
                                                  {-129067, 5760},
                                                  {273431, 4320},
                                                  {-461789, 4320},
                                                  {6961, 72},
                                                  {-35, 1}},
                                                 {{-1, 30240},
                                                  {1, 630},
                                                  {-41, 1260},
                                                  {1877, 5040},
                                                  {-1253, 480},
                                                  {8321, 720},
                                                  {-242639, 7560},
                                                  {22439, 420},
                                                  {-1003, 21},
                                                  {120, 7}},
                                                 {{1, 80640},
                                                  {-47, 80640},
                                                  {59, 5040},
                                                  {-757, 5760},
                                                  {10427, 11520},
                                                  {-45449, 11520},
                                                  {435893, 40320},
                                                  {-39867, 2240},
                                                  {3533, 224},
                                                  {-45, 8}},
                                                 {{-1, 362880},
                                                  {23, 181440},
                                                  {-151, 60480},
                                                  {119, 4320},
                                                  {-3229, 17280},
                                                  {6947, 8640},
                                                  {-197741, 90720},
                                                  {161353, 45360},
                                                  {-263, 84},
                                                  {10, 9}},
                                                 {{1, 3628800},
                                                  {-1, 80640},
                                                  {29, 120960},
                                                  {-1, 384},
                                                  {3013, 172800},
                                                  {-19, 256},
                                                  {4523, 22680},
                                                  {-1303, 4032},
                                                  {7129, 25200},
                                                  {-1, 10}}};
long long int eval(long long int x) {
  long long int s = c[10];
  for (long long int i = 9; i >= 0; i--) {
    s = x * s + c[i];
    s %= 1000003;
  }
  return s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  for (long long int i = 0; i < 11; i++) {
    cout << "? " << i << endl;
    cin >> y[i];
  }
  for (long long int i = 0; i < 11; i++) {
    c[i] = 0;
  }
  for (long long int i = 0; i < 11; i++) {
    for (long long int j = 0; j < 11; j++) {
      auto q = bc[j][10 - i];
      long long int w =
          (((q.first + 1000003) % 1000003) * inv(q.second, 1000003)) % 1000003;
      c[i] += y[j] * w;
      c[i] %= 1000003;
    }
  }
  for (long long int x = 0; x < 1000003; x++) {
    if (eval(x) == 0) {
      cout << "! " << x << endl;
      return 0;
    }
  }
  cout << "! -1" << endl;
}