{"raw_statement":[{"iden":"statement","content":"**This is an interactive problem. In the interaction section below you will see the information about flushing the output.**\n\nIn this problem, you will be playing a game with Hongcow. How lucky of you!\n\nHongcow has a hidden _n_ by _n_ matrix _M_. Let _M__i_, _j_ denote the entry _i_\\-th row and _j_\\-th column of the matrix. The rows and columns are labeled from 1 to _n_.\n\nThe matrix entries are between 0 and 109. In addition, _M__i_, _i_ = 0 for all valid _i_. Your task is to find the minimum value along each row, excluding diagonal elements. Formally, for each _i_, you must find .\n\nTo do this, you can ask Hongcow some questions.\n\nA question consists of giving Hongcow a subset of distinct indices {_w_1, _w_2, ..., _w__k_}, with 1 ≤ _k_ ≤ _n_. Hongcow will respond with _n_ integers. The _i_\\-th integer will contain the minimum value of _min_1 ≤ _j_ ≤ _k__M__i_, _w__j_.\n\nYou may only ask Hongcow at most 20 questions — he thinks you only need that many questions answered.\n\nWhen you are ready to answer, print out a single integer  - 1 on its own line, then _n_ integers on the next line. The _i_\\-th integer should be the minimum value in the _i_\\-th row of the matrix, excluding the _i_\\-th element. Do not forget to flush the final answer as well. Printing the answer does not count as asking a question.\n\nYou will get _Wrong Answer_ verdict if\n\n*   Your question or answers are not in the format described in this statement.\n*   You ask strictly more than 20 questions.\n*   Your question contains duplicate indices.\n*   The value of _k_ in your question does not lie in the range from 1 to _n_, inclusive.\n*   Your final answer is not correct.\n\nYou will get _Idleness Limit Exceeded_ if you don't print anything or if you forget to flush the output, including for the final answer (more info about flushing output below)."},{"iden":"input","content":"The first line of input will contain a single integer _n_ (2 ≤ _n_ ≤ 1, 000)."},{"iden":"output","content":"To print the final answer, print out the string _\\-1_ on its own line. Then, the next line should contain _n_ integers. The _i_\\-th integer should be the minimum value of the _i_\\-th row of the matrix, excluding elements on the diagonal. **Do not forget to flush your answer!**"},{"iden":"interaction","content":"To ask a question, print out a single integer _k_ on its own line, denoting the size of your subset. Then, the next line should contain _k_ integers _w_1, _w_2, ... _w__k_. Note, you must flush your output to get a response.\n\nHongcow will respond by printing out a line with _n_ integers. The _i_\\-th integer in this line represents the minimum value of _M__i_, _w__j_ where _j_ is between 1 and _k_.\n\nYou may only ask a question at most 20 times, otherwise, you will get _Wrong Answer_.\n\nTo flush you can use (just after printing an integer and end-of-line):\n\n*   _fflush(stdout)_ in C++;\n*   _System.out.flush()_ in Java;\n*   _stdout.flush()_ in Python;\n*   _flush(output)_ in Pascal;\n*   See the documentation for other languages.\n\n**Hacking** To hack someone, use the following format\n\nn\nM_{1,1} M_{1,2} ... M_{1,n}\nM_{2,1} M_{2,2} ... M_{2,n}\n...\nM_{n,1} M_{n,2} ... M_{n,n}\n\nOf course, contestant programs will not be able to see this input."},{"iden":"examples","content":"Input\n\n3\n0 0 0\n2 7 0\n0 0 4\n3 0 8\n0 5 4\n\nOutput\n\n3\n1 2 3\n1\n3\n2\n1 2\n1\n2\n1\n1\n-1\n2 5 4\n\nInput\n\n2\n0 0\n0 0\n\nOutput\n\n1\n2\n1\n1\n-1\n0 0"},{"iden":"note","content":"In the first sample, Hongcow has the hidden matrix\n\n\\[\n \\[0, 3, 2\\],\n \\[5, 0, 7\\],\n \\[4, 8 ,0\\],\n\\]\n\nHere is a more readable version demonstrating the interaction. The column on the left represents Hongcow, while the column on the right represents the contestant.\n\n3\n              3\n              1 2 3\n0 0 0\n              1\n              3\n2 7 0\n              2\n              1 2\n0 0 4\n              1\n              2\n3 0 8\n              1\n              1\n0 5 4\n              -1\n              2 5 4\n\nFor the second sample, it is possible for off-diagonal elements of the matrix to be zero."}],"translated_statement":[{"iden":"statement","content":"*这是一个交互式问题。在下面的交互部分，你将看到有关刷新输出的信息。*\n\n在这个问题中，你将和 Hongcow 玩一个游戏。你真幸运！\n\nHongcow 有一个隐藏的 #cf_span[n] × #cf_span[n] 矩阵 #cf_span[M]。令 #cf_span[Mi, j] 表示矩阵的第 #cf_span[i] 行第 #cf_span[j] 列的元素。行和列的编号从 #cf_span[1] 到 #cf_span[n]。\n\n矩阵元素的值在 #cf_span[0] 到 #cf_span[109] 之间。此外，对于所有有效的 #cf_span[i]，有 #cf_span[Mi, i = 0]。你的任务是找出每行中除对角线元素外的最小值。形式上，对于每个 #cf_span[i]，你必须找到 。\n\n为了完成这个任务，你可以向 Hongcow 提问。\n\n一个提问由给出一个互不相同的下标子集 #cf_span[{w1, w2, ..., wk}] 组成，其中 #cf_span[1 ≤ k ≤ n]。Hongcow 会返回 #cf_span[n] 个整数。第 #cf_span[i] 个整数表示 #cf_span[min1 ≤ j ≤ kMi, wj] 的最小值。\n\n你最多只能向 Hongcow 提问 #cf_span[20] 次——他认为你只需要这么多问题的答案。\n\n当你准备好给出答案时，请单独输出一个整数 #cf_span[ - 1]，然后在下一行输出 #cf_span[n] 个整数。第 #cf_span[i] 个整数应为矩阵第 #cf_span[i] 行中除去第 #cf_span[i] 个元素的最小值。同样，请不要忘记刷新最终答案的输出。输出答案不计入提问次数。\n\n如果你出现以下情况，将获得 _Wrong Answer_：\n\n输入的第一行包含一个整数 #cf_span[n]（#cf_span[2 ≤ n ≤ 1, 000]）。\n\n要输出最终答案，请单独输出字符串 _-1_，然后下一行输出 #cf_span[n] 个整数。第 #cf_span[i] 个整数应为矩阵第 #cf_span[i] 行中除去对角线元素的最小值。*不要忘记刷新你的答案！*\n\n要提问，请单独输出一个整数 #cf_span[k]，表示你子集的大小。然后下一行输出 #cf_span[k] 个整数 #cf_span[w1, w2, ... wk]。注意，你必须刷新输出才能获得回应。\n\nHongcow 会返回一行包含 #cf_span[n] 个整数。该行的第 #cf_span[i] 个整数表示 #cf_span[Mi, wj] 的最小值，其中 #cf_span[j] 在 #cf_span[1] 到 #cf_span[k] 之间。\n\n你最多只能提问 #cf_span[20] 次，否则将获得 _Wrong Answer_。\n\n要刷新输出，可以在输出一个整数并换行后使用：\n\n*黑客* 要黑客攻击某人，请使用以下格式：\n\n当然，参赛程序无法看到此输入。\n\n在第一个样例中，Hongcow 的隐藏矩阵为 \n\n以下是一个更易读的交互演示。左侧列代表 Hongcow，右侧列代表参赛者。\n\n在第二个样例中，矩阵的非对角线元素可能为零。\n\n"},{"iden":"input","content":"输入的第一行包含一个整数 #cf_span[n]（#cf_span[2 ≤ n ≤ 1, 000]）。"},{"iden":"output","content":"要输出最终答案，请单独输出字符串 _-1_，然后下一行输出 #cf_span[n] 个整数。第 #cf_span[i] 个整数应为矩阵第 #cf_span[i] 行中除去对角线元素的最小值。*不要忘记刷新你的答案！*"},{"iden":"interaction","content":"要提问，请单独输出一个整数 #cf_span[k]，表示你子集的大小。然后下一行输出 #cf_span[k] 个整数 #cf_span[w1, w2, ... wk]。注意，你必须刷新输出才能获得回应。Hongcow 会返回一行包含 #cf_span[n] 个整数。该行的第 #cf_span[i] 个整数表示 #cf_span[Mi, wj] 的最小值，其中 #cf_span[j] 在 #cf_span[1] 到 #cf_span[k] 之间。你最多只能提问 #cf_span[20] 次，否则将获得 _Wrong Answer_。要刷新输出，可以在输出一个整数并换行后使用：\n\n_fflush(stdout)_ 在 C++ 中；\n_System.out.flush()_ 在 Java 中；\n_stdout.flush()_ 在 Python 中；\n_flush(output)_ 在 Pascal 中；\n请参阅其他语言的文档。\n\n*黑客* 要黑客攻击某人，请使用以下格式：\n\nn\nM_{1,1} M_{1,2} ... M_{1,n}\nM_{2,1} M_{2,2} ... M_{2,n}\n...\nM_{n,1} M_{n,2} ... M_{n,n}\n\n当然，参赛程序无法看到此输入。"},{"iden":"examples","content":"输入\n3\n0 0 0\n2 7 0\n0 0 4\n3 0 8\n0 5 4\n输出\n3\n1 2 3\n1\n3\n2\n1 2\n1\n2\n1\n1\n-1\n2 5 4\n\n输入\n2\n0 0\n0 0\n输出\n1\n2\n1\n1\n-1\n0 0"},{"iden":"note","content":"在第一个样例中，Hongcow 的隐藏矩阵为 [ [0, 3, 2], [5, 0, 7], [4, 8 ,0], ]\n以下是一个更易读的交互演示。左侧列代表 Hongcow，右侧列代表参赛者。\n\n3              3              1 2 3\n0 0 0              1              3\n2 7 0              2              1 2\n0 0 4              1              2\n3 0 8              1              1\n0 5 4              -1              2 5 4\n\n在第二个样例中，矩阵的非对角线元素可能为零。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions:**\n- Let $ M \\in \\mathbb{Z}^{n \\times n} $ be a hidden matrix with $ M_{i,i} = 0 $ for all $ i \\in \\{1, 2, \\dots, n\\} $, and $ 0 \\leq M_{i,j} \\leq 10^9 $ for all $ i \\neq j $.\n\n**Given/Constraints:**\n- $ 2 \\leq n \\leq 1000 $\n- You may query at most 20 times.\n- Each query: submit a subset $ W = \\{w_1, w_2, \\dots, w_k\\} \\subseteq \\{1, 2, \\dots, n\\} $, $ 1 \\leq k \\leq n $.\n- Response to query $ W $: for each row $ i \\in \\{1, \\dots, n\\} $, return $ \\min_{j \\in W} M_{i,j} $.\n\n**Objective:**\n- For each row $ i \\in \\{1, \\dots, n\\} $, compute $ \\min_{j \\neq i} M_{i,j} $.\n\n**Output:**\n- Print $-1$, then $ n $ integers: $ \\min_{j \\neq i} M_{i,j} $ for $ i = 1 $ to $ n $.","simple_statement":null,"has_page_source":false}