#include <bits/stdc++.h>
using namespace std;
const int M = 1000003;
int T, n;
int f[15];
int a[15];
int x[15];
int modExp(long long a, long long n, int p) {
  if (n == 0) return 1;
  int ret = 1;
  a = (a % p + p) % p;
  for (; n; n >>= 1, a = a * a % p)
    if (n & 1) ret = ret * a % p;
  return ret;
}
void interpolate(int *x, int *y, int n, int P, int *a) {
  int *d = new int[n + 1];
  memset(d, 0, sizeof(int) * (n + 1));
  memset(a, 0, sizeof(int) * (n + 1));
  d[0] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = i; j >= 0; j--) {
      d[j + 1] = (d[j + 1] + d[j]) % P;
      d[j] = (long long)d[j] * (P - x[i]) % P;
    }
  }
  for (int i = 0; i < n; i++) {
    int mul = 1;
    for (int j = 0; j < n; j++)
      if (i != j) mul = 1LL * mul * (x[i] - x[j] + P) % P;
    mul = modExp(mul, P - 2, P);
    int last = (long long)mul * d[n] % P;
    for (int j = n - 1; j >= 0; j--) {
      a[j] = (a[j] + (long long)last * y[i]) % P;
      last = ((long long)last * x[i] + (long long)mul * d[j]) % P;
    }
  }
}
int g[100];
const int N = 11;
int main() {
  for (int i = 0; i < N; i++) {
    cout << "? " << i + 1 << '\n';
    cout.flush();
    x[i] = i + 1;
    cin >> f[i];
  }
  interpolate(x, f, N, M, a);
  for (int i = 0; i < M; i++) {
    int tmp = 0;
    for (int j = 0; j < N; j++) {
      tmp = (tmp + 1LL * a[j] * modExp(i, j, M) % M) % M;
    }
    if (tmp == 0) {
      cout << "! " << i << '\n';
      return 0;
    }
  }
  cout << "! " << -1 << '\n';
  return 0;
}
