The District Attorney(DA) of Hell’s Kitchen has been defined following functions.
: Returns the greatest common divisor of and .
: Returns the sum of distinct positive integer divisors of .
: Returns the maximum prime divisor of if any of the following conditions become true and has at least one prime divisor. Otherwise returns .
Today, Matt Murdock and Wilson Fisk are in a game. Initially integers are given to them. At first, Matt chooses an integer between and inclusively and earns points. Then, Fisk chooses an integer between and inclusively (not necessarily distinct from ) and earns points. Maximum point earner is the winner.
As Matt is busy saving Hell’s kitchen, he wants you to find an integer so that at least he doesn’t lose. So, it’s your time to save the savior of Hell’s Kitchen.
First line of the input contains an integer denotes number of testcases.
Each of the testcase contains space separated integers , , and .
For each testcase, print any integer so that Matt doesn’t lose at least. If Matt can’t avoid losing, print .
4 1 2 1 1 26 79 288 79 7 47 16 30 1 18 35 33
2 79 47 17