#include <bits/stdc++.h>
using namespace std;
long long pows(long long a, long long b) {
  long long ans = 1ll;
  a %= 1000003;
  while (b) {
    if (b & 1) ans = (ans * (a + 0ll) % 1000003);
    b >>= 1ll;
    a = (a * a) % 1000003;
  }
  return ans;
}
int32_t main() {
  long long n = 12;
  long long x[13], y[13];
  for (long long i = 1; i <= n; i++) {
    cout << "? " << i << '\n';
    fflush(stdout);
    x[i] = i;
    cin >> y[i];
  }
  long long f[13]{0};
  for (long long i = 1; i <= n; i++) {
    long long s2 = 1;
    for (long long j = 1; j <= n; j++) {
      if (i != j) s2 = s2 * (x[i] - x[j]) % 1000003;
    }
    f[i] = pows(s2, 1000003 - 2);
  }
  for (long long k = 0; k < 1000003; k++) {
    long long ans = 0;
    for (long long i = 1; i <= n; i++) {
      long long s = y[i] % 1000003;
      for (long long j = 1; j <= n; j++) {
        if (i != j) s = s * (k - x[j]) % 1000003;
      }
      ans = (ans + 1000003 + s * f[i]) % 1000003;
    }
    if (ans == 0) {
      cout << "! " << k << '\n';
      fflush(stdout);
      return 0;
    }
  }
  cout << "! " << -1 << '\n';
  fflush(stdout);
  return 0;
}
