A game with piles of stones is given. The turn of the player is that he can take an arbitrary number of stones from one pile, or even number of stones from all. Players alternate moves. The player who can not make a move is a looser.
Mansur plays this game with Alexander. There are two piles of stones, the first one contains a stones, the second pile contains b stones. Первым ходит Мансур. Мансур понял, что если он может проиграть в заданную игру, он может своим ходом добавить третью кучку камней так, чтобы гарантированно победить. Если Мансур добавляет третью кучку, то ход переходит к Александру и далее игра идет только на трех кучках. Теперь перед ним встала задача, может ли он выиграть в эту игру или ему нужно первым ходом добавить третью кучку, тогда какого она должна быть размера? Помогите Мансуру. Мансур и Александр опытные ACMщики, поэтому можете считать, что они всегда ходят оптимально.
First line contains number of tests t (1 ≤ t ≤ 100000). Each of the next t lines contains two integers a and b.
Print t lines: "MANSUR" if Mansur wins in initial game, or number x if Mansur must add the pile of x stones to win. If there are multiple answers, print any.