The game involves piles of stones. During a player's turn, they can either take any number of stones from one pile or take the same number of stones from all piles. Players alternate turns, and the player who cannot make a move loses.
Mansur is playing this game against Alexander. Initially, there are two piles of stones on the table, with stones in the first pile and stones in the second. Mansur takes the first turn. He realizes that if he is in a losing position, he has the option to add a third pile of stones during his turn to secure a win. If Mansur decides to add a third pile, the turn immediately passes to Alexander, and the game continues with three piles. Mansur's challenge is to determine whether he can win the game from the start or if he needs to add a third pile on his first move, and if so, what size it should be. Both Mansur and Alexander are skilled ACM competitors, so they will always play optimally.
The first line contains the number of test cases (1 \le t \le 100000). Each of the following lines contains two integers and .
For each test case, output "MANSUR" if Mansur can win in the initial setup. If Mansur needs to add a third pile to win, output a number representing the number of stones in the new pile. If there are multiple valid answers, you may output any one of them.
Example 1