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 JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author DY
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        EGuessTheRoot solver = new EGuessTheRoot();
        solver.solve(1, in, out);
        out.close();
    }

    static class EGuessTheRoot {
        int K = 11;
        int MOD = (int) 1e6 + 3;

        public void solve(int testNumber, InputReader in, OutputWriter out) {

            long[] y = new long[K];
            for (int i = 0; i < K; ++i) {
                out.printLine("? " + i);
                out.flush();
                y[i] = in.readLong();
            }
            long[] poly = new long[K];
//        long[][] quot = new long[K][K];
//        for (int i = 0; i < K; ++i) {
//            for (int j = 0; j < K - i; ++j) {
//                long res;
//                if (i == 0) res = y[j] % MOD;
//                else res = (quot[i - 1][j + 1] - quot[i - 1][j]) * inv(i) % MOD;
//                quot[i][j] = res;
//            }
//        }
//        for (int i = 0; i < K; ++i) poly[i] = quot[i][0];


            int n = K - 1;
            long[][] A = new long[n][n];
            long[] y2 = new long[n];
            for (int i = 0; i < n; ++i) {
                long acc = i + 1;
                for (int j = 0; j < n; ++j) {
                    A[i][j] = acc;
                    acc = acc * (i + 1) % MOD;
                }
                y2[i] = (y[i + 1] - y[0] % MOD + MOD) % MOD;
            }
//        for (int row = 0; row < n; ++row) {
//            for (int col = 0; col < n; ++col) {
//                out.print(A[row][col] + " ");
//            }
//            out.printLine();
//        }
            for (int var = 0; var < n; ++var) {
                int mid = var;
//            for (int row = var + 1; row < n; ++row) {
//                if (A[row][var] > A[mid][var]) mid = row;
//            }
//            if (mid != var) {
//                for (int col = 0; col < n; ++col) {
//                    long t = A[var][col];
//                    A[var][col] = A[mid][col];
//                    A[mid][col] = t;
//                }
//                mid = var;
//            }

                for (int row = 0; row < n; ++row) {
                    if (row == mid) continue;
                    long lcm = lcm(A[row][var], A[mid][var]);
                    long mult1, mult2;
                    if (lcm == 0) {
                        mult1 = mult2 = 0;
                    } else {
                        mult1 = lcm / A[mid][var];
                        mult2 = lcm / A[row][var];
                    }
                    long mult = A[row][var] * inv(A[mid][var]) % MOD;
                    for (int col = 0; col < n; ++col) {
//                    A[row][col] = ((A[row][col] * mult2 % MOD - A[mid][col] * mult1 % MOD) % MOD + MOD) % MOD;
                        A[row][col] = ((A[row][col] - A[mid][col] * mult % MOD) % MOD + MOD) % MOD;
                    }
//                y2[row] = ((y[row] * mult2 % MOD - y[mid] * mult1 % MOD) % MOD + MOD) % MOD;
                    y2[row] = ((y2[row] - y2[mid] * mult % MOD) % MOD + MOD) % MOD;
                }
            }
            for (int var = 0; var < n; ++var) {
                poly[var + 1] = y2[var] * inv(A[var][var]) % MOD;
                if (inv(A[var][var]) * A[var][var] % MOD != 1) {
                    throw new RuntimeException();
                }
            }
            poly[0] = y[0];

//        out.printLine(poly);
//        for (int row = 0; row < n; ++row) {
//            for (int col = 0; col < n; ++col) {
//                out.print(A[row][col] + " ");
//            }
//            out.printLine();
//        }
//        out.printLine(y2);

            for (int x = 0; x < K; ++x) {
                long fx = evaluate(x, poly);
                if (fx != y[x]) {
//                System.out.println(x + ": " + fx + " != " + y[x]);
                    throw new RuntimeException();
                }
            }

            for (long x = 0; x < MOD; ++x) {
                if (evaluate(x, poly) == 0) {
                    out.printLine("! " + x);
                    out.flush();
                    return;
                }
            }
            out.printLine("! " + -1);
            out.flush();
        }

        private long lcm(long a, long b) {
            return a * b / gcd(a, b);
        }

        private long gcd(long a, long b) {
            return b == 0 ? a : gcd(b, a % b);
        }

        private long evaluate(long x, long[] poly) {
            long fx = 0;
            long acc = 1;
            for (int i = 0; i < poly.length; ++i) {
                fx = (fx + poly[i] * acc % MOD) % MOD;
                acc = acc * x % MOD;
            }
            return fx;
        }

        private long inv(long x) {
            long res = 1;
            long acc = x;
            long pow = MOD - 2;
            while (pow > 0) {
                if ((pow & 1) != 0) {
                    res *= acc;
                    res %= MOD;
                }
                acc = acc * acc % MOD;
                pow >>= 1;
            }
            return res;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }

    }
}