You're given two integers and , You can do the following operation at most times:
Either increase by (x := x+6) or multiply by (x := 7x)
Output the maximum value of that you can achieve.
The first line consists of a single integer (1 \le t \le 2000)the number of testcases.
Each testcase consists of two integers and (-1000 \le x \le 1000 , 0 \le k \le 15).
The output consists of lines, each containing one value (the maximum value of that you can achieve).
Example 1
Subtask ( points): No additional constraints