Three players Alice and Bob and Charlie are playing a game. There are two tables, on the first table, there are N heaps containing A,A.... A[n] coins, on the second table , there are M heaps containing B, B... B[m] coins.Input Format
Initially, Alice is playing at the first table and Bob is playing at the second table. The players take their turns in this order: Charlie, Alice, Bob, Charlie, etc.
Bob and alice in their turn can remove as much coin as they want(min is 1) from any one pile of their respective tables. Whoever cannot remove any stone from a pile loses.
Charlie does not play at any table. Instead, on his turn, he decides if Alice and Bob should keep playing at their respective tables or swap places.
Alice and Charlie are buddies and they cooperate, playing in the optimal way that results in Alice's victory (if possible). Find out whether alice will win or bob.
The first line contains two space separated integers n and m.Output Format
The second line contains n space separated integers a,a...a[n].
The third line contains m space separated integers b, b....b[n].
Print the winner (ALICE or BOB).Question Video
1<= n,m <= 10^5Sample Input
1<= A[i] <= 10^8
1<= B[i] <= 10^8
6 7Sample Output
24 6 10 56 9 1
0 6 24 1 9 56 10
Asked in Companies