#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << '{';
  string sep;
  for (const auto &x : v) os << sep << x, sep = ", ";
  return os << '}';
}
template <typename T, size_t size>
ostream &operator<<(ostream &os, const array<T, size> &arr) {
  os << '{';
  string sep;
  for (const auto &x : arr) os << sep << x, sep = ", ";
  return os << '}';
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p) {
  return os << '(' << p.first << ", " << p.second << ')';
}
void dbg_out() { cerr << endl; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
  cerr << ' ' << H;
  dbg_out(T...);
}
const int N = 1e5 + 5, mod = 1e6 + 3, bit = 61;
template <const int &MOD>
struct _m_int {
  int val;
  _m_int(int64_t v = 0) {
    if (v < 0) v = v % MOD + MOD;
    if (v >= MOD) v %= MOD;
    val = v;
  }
  static int mod_inv(int a, int m = MOD) {
    int g = m, r = a, x = 0, y = 1;
    while (r != 0) {
      int q = g / r;
      g %= r;
      swap(g, r);
      x -= q * y;
      swap(x, y);
    }
    return x < 0 ? x + m : x;
  }
  explicit operator int() const { return val; }
  explicit operator int64_t() const { return val; }
  _m_int &operator+=(const _m_int &other) {
    val -= MOD - other.val;
    if (val < 0) val += MOD;
    return *this;
  }
  _m_int &operator-=(const _m_int &other) {
    val -= other.val;
    if (val < 0) val += MOD;
    return *this;
  }
  static unsigned fast_mod(uint64_t x, unsigned m = MOD) {
    return x % m;
    unsigned x_high = x >> 32, x_low = (unsigned)x;
    unsigned quot, rem;
    asm("divl %4\n" : "=a"(quot), "=d"(rem) : "d"(x_high), "a"(x_low), "r"(m));
    return rem;
  }
  _m_int &operator*=(const _m_int &other) {
    val = fast_mod((uint64_t)val * other.val);
    return *this;
  }
  _m_int &operator/=(const _m_int &other) { return *this *= other.inv(); }
  friend _m_int operator+(const _m_int &a, const _m_int &b) {
    return _m_int(a) += b;
  }
  friend _m_int operator-(const _m_int &a, const _m_int &b) {
    return _m_int(a) -= b;
  }
  friend _m_int operator*(const _m_int &a, const _m_int &b) {
    return _m_int(a) *= b;
  }
  friend _m_int operator/(const _m_int &a, const _m_int &b) {
    return _m_int(a) /= b;
  }
  _m_int &operator++() {
    val = val == MOD - 1 ? 0 : val + 1;
    return *this;
  }
  _m_int &operator--() {
    val = val == 0 ? MOD - 1 : val - 1;
    return *this;
  }
  _m_int operator++(int) {
    _m_int before = *this;
    ++*this;
    return before;
  }
  _m_int operator--(int) {
    _m_int before = *this;
    --*this;
    return before;
  }
  _m_int operator-() const { return val == 0 ? 0 : MOD - val; }
  bool operator==(const _m_int &other) const { return val == other.val; }
  bool operator!=(const _m_int &other) const { return val != other.val; }
  bool operator<(const _m_int &other) const { return val < other.val; }
  bool operator<=(const _m_int &other) const { return val <= other.val; }
  bool operator>(const _m_int &other) const { return val > other.val; }
  bool operator>=(const _m_int &other) const { return val >= other.val; }
  _m_int inv() const { return mod_inv(val); }
  _m_int pow(int64_t p) const {
    if (p < 0) return inv().pow(-p);
    _m_int a = *this, result = 1;
    while (p > 0) {
      if (p & 1) {
        result *= a;
      }
      a *= a;
      p >>= 1;
    }
    return result;
  }
  friend ostream &operator<<(ostream &os, const _m_int &m) {
    return os << m.val;
  }
};
extern const int MOD = 1e6 + 3;
using mod_int = _m_int<MOD>;
int gauss(vector<vector<mod_int>> a, vector<mod_int> &ans) {
  int n = a.size();
  int m = (int)a[0].size() - 1;
  vector<int> where(m, -1);
  for (int col = 0, row = 0; col < m && row < n; col++) {
    int sel = row;
    for (int i = row; i < n; i++) {
      if (a[i][col] > a[sel][col]) {
        sel = i;
      }
    }
    if (a[sel][col] == 0) {
      continue;
    }
    swap(a[sel], a[row]);
    where[col] = row;
    for (int i = 0; i < n; i++) {
      if (i == row) {
        continue;
      }
      mod_int c = a[i][col] / a[row][col];
      for (int j = col; j <= m; j++) {
        a[i][j] -= a[row][j] * c;
      }
    }
    row++;
  }
  ans.assign(m, 0);
  for (int i = 0; i < m; i++) {
    if (where[i] != -1) {
      ans[i] = a[where[i]][m] / a[where[i]][i];
    }
  }
  for (int i = 0; i < n; i++) {
    mod_int sum = 0;
    for (int j = 0; j < m; j++) {
      sum += a[i][j] * ans[j];
    }
    if (sum != a[i][m]) {
      return 0;
    }
  }
  for (int i = 0; i < m; i++) {
    if (where[i] == -1) {
      int INF_SOL = 2;
      return INF_SOL;
    }
  }
  return 1;
}
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  vector<vector<mod_int>> a;
  for (long long x = 0; x <= 10; x++) {
    mod_int curr = 1;
    vector<mod_int> v;
    for (long long i = 0; i <= 10; i++) {
      v.push_back(curr);
      curr = (curr * x);
    }
    cout << "? " << x << endl;
    int res = 0;
    cin >> res;
    v.push_back((mod_int)res);
    a.push_back(v);
  }
  vector<mod_int> ans;
  int fans = -1;
  gauss(a, ans);
  for (long long x = 0; x <= mod - 1; x++) {
    mod_int val = 0, curr = 1;
    for (long long i = 0; i <= 10; i++) {
      val += ans[i] * curr;
      curr = (curr * x);
    }
    if (val == 0) {
      fans = x;
      break;
    }
  }
  cout << "! " << fans << endl;
  return 0;
}
