We have an unsolved mystery this time too!
Input:
First line of input contains T – the number of test cases. Each of the next T lines contain two integers a and b separated by a space.
Output:
Output T lines, each containing a single integer that is the output of that test case.
Constraints:
1<=T<=300
1<=a<=999
5<=b<=8
No explanation!!