You are given a sequence of n digits d_0, d_1, \dots d_n−1. Find the minimum positive integer x such that for all 0≤i<n, the decimal representation of number x+i contains the digit d_i.
Each test contains multiple test cases. The first line contains the number of test cases t (1≤t≤105). The description of the test cases follows.
The first line of each test case contains a single integer n (1≤n≤106).
The second line contains a string of n digits d_0d_1…d_n−1 (0≤d_i≤9).
It is guaranteed that the sum of n over all test cases does not exceed 106.
For each test case, print a single integer x --- the smallest positive integer such that the decimal representation of x+i contains the digit d_i for all 0≤i<n.