#C10242. Card Game Winner

    ID: 39426 Type: Default 1000ms 256MiB

Card Game Winner

Card Game Winner

In this problem, two players, Ali and Bashir, play a simple card game. There are n cards in total. In each turn, a player picks between 1 and k cards. The play proceeds alternately between Ali and Bashir until all cards are picked. However, the twist is that the outcome can be pre-determined mathematically. Specifically, if

\( n \bmod (k+1) \neq 0 \)

then Ali (the first player) can always force a win; otherwise, Bashir wins. Your task is to determine the winner for each given test case.

inputFormat

The first line of input contains an integer T, the number of test cases. Each of the following T lines contains two integers n and k separated by a space, representing the total number of cards and the maximum number of cards a player can draw in one turn respectively.

outputFormat

For each test case, output a single line containing the winner’s name: either "Ali" or "Bashir".

## sample
3
10 3
15 4
7 2
Ali

Bashir Ali

</p>