AT_arc208_a [ARC208A] Bitwise OR Game

Description

There are $ N $ piles of stones, and the $ i $ -th pile $ (1\le i\le N) $ has $ A_i $ stones. Alice and Bob will play the following game using these piles: - Starting with Alice, the two players take turns alternately. - In each turn, the player chooses one non-empty pile and removes one or more stones from that pile. However, the player cannot make a move that changes the bitwise $ \mathrm{OR} $ of the numbers of stones of all piles. The player who cannot make a move first loses. Determine which player wins when both players play optimally. You are given $ T $ test cases; solve each of them. What is bitwise $ \mathrm{OR} $ ? The bitwise $ \mathrm{OR} $ of non-negative integers $ A $ and $ B $ , $ A\ \mathrm{OR}\ B $ , is defined as follows: - When $ A\ \mathrm{OR}\ B $ is written in binary, the digit in the $ 2^k $ place ( $ k \geq 0 $ ) is $ 1 $ if at least one of the digits in the $ 2^k $ place of $ A $ and $ B $ written in binary is $ 1 $ , and $ 0 $ otherwise. For example, $ 3\ \mathrm{OR}\ 5 = 7 $ (in binary: $ 011\ \mathrm{OR}\ 101 = 111 $ ). In general, the bitwise $ \mathrm{OR} $ of $ k $ non-negative integers $ p_1, p_2, p_3, \dots, p_k $ is defined as $ (\dots ((p_1\ \mathrm{OR}\ p_2)\ \mathrm{OR}\ p_3)\ \mathrm{OR}\ \dots\ \mathrm{OR}\ p_k) $ , and it can be proved that this is independent of the order of $ p_1, p_2, p_3, \dots p_k $ .

Input Format

The input is given from Standard Input in the following format: > $ T $ $ \text{case}_1 $ $ \text{case}_2 $ $ \vdots $ $ \text{case}_T $ Each test case is given in the following format: > $ N $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $

Output Format

Output the answers for each test case in order, separated by newlines. For each test case, print `Alice` if Alice wins when both players play optimally, and `Bob` if Bob wins.

Explanation/Hint

### Sample Explanation 1 Consider the first test case. Initially, the bitwise $ \mathrm{OR} $ of the numbers of stones of all piles is $ 3\ \mathrm{OR}\ 4\ \mathrm{OR}\ 6=7 $ . The moves Alice can make are as follows: - Remove two stones from the first pile. - Remove one or more stones from the second pile. - Remove one or more stones from the third pile. For example, if Alice removes one stone from the first pile, the bitwise $ \mathrm{OR} $ of the numbers of stones of all piles becomes $ 2\ \mathrm{OR}\ 4\ \mathrm{OR}\ 6=6 $ . Therefore, Alice cannot make the move of removing one stone from the first pile. If Alice removes six stones from the third pile, Bob cannot make any move in the next turn. Therefore, the winner when both players play optimally is Alice. ### Constraints - $ 1\le T\le 10^5 $ - $ 2\le N \le 2\times 10^5 $ - The sum of $ N $ over all test cases is at most $ 2\times 10^5 $ . - $ 1\le A_i \le 10^9 $ - All input values are integers.