Problem: Consider all equalities of form , where has digits, has digits, and has digits. All the numbers are positive integers and are written without leading zeroes. Find the -th lexicographically smallest equality when written as a string like above or determine that it does not exist.
For example, the first three equalities satisfying , , are
- ,
- ,
- .
An equality is lexicographically smaller than an equality with the same lengths of the numbers if and only if the following holds:
- in the first position where and differ, the equality has a smaller digit than the corresponding digit in .
Input Format: Each test contains multiple test cases. The first line of input contains a single integer () — the number of test cases. The description of test cases follows.
The first line of each test case contains integers , , , (, ).
Each input file has at most test cases which do not satisfy .
Output Format: For each test case, if there are strictly less than valid equalities, output .
Otherwise, output the -th equality as a string of form .
Note: In the first test case, the first solutions are: .
Int the third test case, there are no solutions as the smallest possible values for and are larger than the maximal possible value of — .
Please note that whitespaces in the output matter.