{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eJury picked a polynomial $$$f(x) \u003d a_0 + a_1 \\cdot x + a_2 \\cdot x^2 + \\dots + a_k \\cdot x^k$$$. $$$k \\le 10$$$ and all $$$a_i$$$ are integer numbers and $$$0 \\le a_i \u0026lt; 10^6 + 3$$$. It\u0027s guaranteed that there is at least one $$$i$$$ such that $$$a_i \u0026gt; 0$$$.\u003c/p\u003e\u003cp\u003eNow jury wants you to find such an integer $$$x_0$$$ that $$$f(x_0) \\equiv 0 \\mod (10^6 + 3)$$$ or report that there is not such $$$x_0$$$.\u003c/p\u003e\u003cp\u003eYou can ask no more than $$$50$$$ queries: you ask value $$$x_q$$$ and jury tells you value $$$f(x_q) \\mod (10^6 + 3)$$$.\u003c/p\u003e\u003cp\u003eNote that printing the answer doesn\u0027t count as a query.\u003c/p\u003e"}},{"title":"Interaction","value":{"format":"HTML","content":"\u003cp\u003eTo ask a question, print \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e? $$$x_q$$$\u003c/span\u003e\" $$$(0 \\le x_q \u0026lt; 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.\u003c/p\u003e\u003cp\u003eAfter printing a query do not forget to output end of line and flush the output. Otherwise, you will get \u003cspan class\u003d\"tex-font-style-tt\"\u003eIdleness limit exceeded\u003c/span\u003e. To do this, use: \u003c/p\u003e\u003cul\u003e \u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003efflush(stdout)\u003c/span\u003e or \u003cspan class\u003d\"tex-font-style-tt\"\u003ecout.flush()\u003c/span\u003e in C++; \u003c/li\u003e\u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003eSystem.out.flush()\u003c/span\u003e in Java; \u003c/li\u003e\u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003eflush(output)\u003c/span\u003e in Pascal; \u003c/li\u003e\u003cli\u003e \u003cspan class\u003d\"tex-font-style-tt\"\u003estdout.flush()\u003c/span\u003e in Python; \u003c/li\u003e\u003cli\u003e see documentation for other languages. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eWhen you are ready to answer, print \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e! $$$x_0$$$\u003c/span\u003e\" where $$$x_0$$$ is the answer or $$$-1$$$ if there is no such $$$x_0$$$.\u003c/p\u003e\u003cp\u003eYou can ask at most $$$50$$$ questions per test case.\u003c/p\u003e\u003cp\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eHack Format\u003c/span\u003e\u003c/p\u003e\u003cp\u003eTo hack, use the following format.\u003c/p\u003e\u003cp\u003eThe only line should contain $$$11$$$ integers $$$a_0, a_1, \\dots, a_{10}$$$ ($$$0 \\le a_i \u0026lt; 10^6 + 3$$$, $$$\\max\\limits_{0 \\le i \\le 10}{a_i} \u0026gt; 0$$$) — corresponding coefficients of the polynomial.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e \n1000002\n\n0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e? 0\n\n? 1\n\n! 1\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e \n5\n\n2\n\n1\n\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e? 2\n\n? 1\n\n? 0\n\n! -1\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eThe polynomial in the first sample is $$$1000002 + x^2$$$.\u003c/p\u003e\u003cp\u003eThe polynomial in the second sample is $$$1 + x^2$$$.\u003c/p\u003e"}}]}