You are given an integer N.
Now you have to perform the following operation exactly K times :-
Choose two different positions, i and j, and swap the digits at those positions. This swap must not cause the resulting number to have a leading zero.
You have to find the maximal possible number one can get at the end of this procedure. If it's not possible to perform K operations, print -1 instead.
The first line will contain the no. of test cases T.
For each test case there will be two integers N and K separated by a space.
For each test case output a single integer (i.e. maximal possible number formed) in a separate line.
Problem Setter:- Nitish Agarwal