spoj#ADAGAME2. Ada and Easy Game
Ada and Easy Game
Ada the Ladybug is frequently playing board games against her friend Velvet Mite Vinit. Last time, they were playing Game of Digits. Anyway Vinit is slightly mad at Ada, because she "cheated". She let one of her good friends to make program which helped her significantly. As Vinit wants to avoid this, he created Game of Piles with his own rules. He puts many piles with many nuts on the table. He then chooses a few numbers (rules), which are possible moves. Ada and Vinit play alternately (as Vinit is gentleman, Ada starts). In each move one can choose a pile, any number from rules (not greater than the number of nuts in the pile) and eats that many nuts from pile. The one who can't move looses. Vinit is very excited to play since he is ensured Ada can't cheat this time.
Well that was just a fun fact from world of bugs and now lets solve some completely different problem. Your good friend Ada has asked you to help her win a game agains one of her friends...
Input
First line of input will consist T ≤ 200 number of test-cases.
Each testcase will begin with two numbers 0 < N ≤ 105 [number of piles] and 0 < M ≤ 30 [number of rules].
The next line will consist of M numbers, 1 ≤ Ri ≤ 105 [rules]
The last line of each test-case will consist of N numbers,1 ≤ Pi ≤ 105 [sizes of pile]
Output
For each test-case, print the name of winner ("Ada" or "Vinit") [if both played optimally].
Example Input
6 4 1 2 1 2 3 4 4 2 1 2 4 4 3 5 1 3 2 3 5 20 2 2 1 3 4 7 5 5 1 2 7 13 15 10 20 30 40 50 1 2 1 2 98997
Example Output
Vinit Ada Ada Ada Ada Vinit