{"raw_statement":[{"iden":"problem statement","content":"You are given positive integers $N$, $X$, $Y$ and a length-$N$ integer sequence $A=(A_1,A_2,\\ldots,A_N)$.\nThere are $N$ piles of stones, and the $i$\\-th pile $(1\\le i\\le N)$ has $A_i$ stones.\nAlice and Bob will play the following game using these piles:\n\n*   Starting with Alice, the two players take turns alternately.\n*   In each turn, the player chooses one non-empty pile and removes one or two stones from that pile. However, the player cannot make a move such that the number of stones in that pile becomes a multiple of $X$ or a multiple of $Y$ after removing stones.\n\nThe player who cannot make a move first loses.\nDetermine which player wins when both players play optimally.\nYou are given $T$ test cases, solve each of them."},{"iden":"constraints","content":"*   $1\\le T \\le 2\\times 10^5$\n*   $1\\le N \\le 2\\times 10^5$\n*   The sum of $N$ over all test cases is at most $2\\times 10^5$.\n*   $1\\le X < Y\\le 10^9$\n*   $1\\le A_i \\le 10^{18}$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$T$\n$\\text{case}_1$\n$\\text{case}_2$\n$\\vdots$\n$\\text{case}_T$\n\nEach test case is given in the following format:\n\n$N$ $X$ $Y$\n$A_1$ $A_2$ $\\ldots$ $A_N$"},{"iden":"sample input 1","content":"3\n2 3 5\n4 12\n5 1 2\n1 2 3 4 5\n6 530 879\n17031 42909 97721 34323 39597 26999"},{"iden":"sample output 1","content":"Alice\nBob\nAlice\n\nConsider the first test case.\nFor example, the game proceeds as follows:\n\n*   Alice removes two stones from the first pile. The first pile has two stones remaining.\n*   Bob removes one stone from the second pile. The second pile has eleven stones remaining.\n*   Alice removes one stone from the first pile. The first pile has one stone remaining.\n*   Bob cannot make a move, so Bob loses and Alice wins.\n\nIn this test case, Alice always wins no matter how both players make their moves. Therefore, print `Alice` on the first line."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}