{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n div.illustration {\n float: right;\n padding-left: 20px;\n }\n div.illustration .illustration {\n width: 100%;\n border-radius: 4px;\n }\n pre {\n display: block;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n color: #333;\n word-break: break-all;\n word-wrap: break-word;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"MD","content":"When little girl \u003cb\u003eAleeza\u003c/b\u003e was just 2 years old, she started counting numbers. But as it was a new topic to her, sometimes she missed the sequences. Like 1 2 4 3. Her parents had to correct her every time to mitigate mistakes.\n\nIn this contest, you will write a program that is capable of detecting such mistakes. Your task will only be to identify the position where the sequence is broken."}},{"title":"Input","value":{"format":"MD","content":"The input starts with an integer n, where 1 ≤ n ≤ 100, representing the number of test cases. Each line to the following n lines starts with g, where 3 ≤ g ≤ 1000 denotes the number of counts followed by g space-separated unique integer numbers within 0 to 1000. "}},{"title":"Output","value":{"format":"MD","content":"For each line of input produce one line of output containing the position where she broke the sequence."}},{"title":"Sample Input","value":{"format":"MD","content":"3\n7 1 2 3 4 8 5 6\n5 3 4 5 2 6\n4 10 20 11 12\n"}},{"title":"Sample Output","value":{"format":"MD","content":"5\n4\n2\n"}}]}