| Algorithmia IIITN 2024 - Round 1 |
|---|
| Finished |
You are given a reverse binary string of a number $$$n$$$.
Alice and Bob are playing a game.
The play starts with the number $$$n$$$. In each turn a player can choose any one of the following moves:
The player who is unable to play wins the game.
Bob starts the game. Determine the winner if both Alice and Bob play optimally.
The first line contains a single integer $$$t$$$ $$$(1 \le t \le 10_{}^3)$$$ – the number of test cases. The description of the test cases follows.
The first line of each test case contains a single integer $$$x$$$ $$$(1 \le x \le 34)$$$ — the length of binary string.
The second line of each test case contains a reverse binary string of $$$n$$$.
For each test case print single world in a new line:
Note that the output is case sensitive.
3 2 11 3 001 3 101
BOB ALICE BOB
| Name |
|---|


