#c22802. 取石子游戏
取石子游戏
Stone Picking Game
Problem Description
There is a pile of stones. Alice and Bob take turns making moves, with Alice going first. In each of her turns, Alice may take , or stones (that is, choose some and remove exactly stones); in each of his turns, Bob may take , or stones. Whoever cannot make a move loses.
For every , determine who wins.
Input Format
The first line contains three integers (, ).
The second line contains integers ().
The third line contains integers ().
Output Format
Output lines, each containing either Alice or Bob, indicating the winner for that value of .
Sample Input
3 5 10
1 3 4
2 3 5 6 7
Sample Output
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Bob
Bob
Constraints
, , .