Alice has a set of N unpleasant pairs of digits.
Consider a number bad if it satisfies the following conditions:
Otherwise, the number is considered good.
Your task is to determine K ascending good numbers.
Input format
Output format
Print T lines. The ith line must contain an answer for the ith test case.
Note: If answer is more than 5×1018, print -1.
Constraints
1≤T≤1000
0≤n<100
0≤d1,d2≤9
1≤K≤1018
The first 25 numbers that are good for the first test -> (1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,24,25,26,27)