Guess the Fake Coin

There are n coins. One of the coins is fake: it is slightly heavier than the other coins, and all other coins have the same weight. Your task is to find out the fake coin. Interaction Protocol Your program should read from standard input, and write to standard output. After printing each line to the standard output, you should flush the output, by calling fflush(stdout) or cout << flush in C/C++, flush(output) in Pascal and System.out.flush() in Java. Please read general instructions for interactive problems for more information. First, read the number of test cases T (1 ≤ T ≤ 100). For each test case, read an integer n (3 ≤ n ≤ 120) in the first line, then issue one or more ‘Test’ command, followed by an ‘Answer’ command. Command Description Test L1 L2 ...R1 R2 ... Places coins L1, L2 ...on the left side and R1, R2 ...on the right side (1 ≤ Li,Ri ≤ n), and returns theresulta. a=1meansleft>right,a=−1 means left < right, a = 0 means left = right. There should be an even number of coins, and the first half are placed on the left side. No coin should appear in a command twice. Answer b Tell us your answer. This command does not return anything. If your program violated any of these rules (bad format, invalid arguments etc), the server will exit immediately, and you will receive Protocol Violation (PV). Protocol Limit For each test case, you can issue at most 5 ‘Test’ commands, otherwise you’ll get Protocol Limit Exceeded (PLE). Sample Interaction 1 9 -1 0 Test 1 2 3 4 5 6 Test 4 5 Answer 6